a,b=map(int,input().split()) c,d=map(int,input().split()) x,y=(a+c)/2,(b+d)/2 print(abs(x-a)+abs(y-b))