i=lambda:map(int,input().split());a,b=i();c,d=i();print((abs(a-c)+abs(b-d))/2)