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