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