g=lambda:map(int,input().split()) A,B=g() X,Y=g() print((abs(A-X)+abs(B-Y))/2)