A=lambda:map(int,input().split()) B,C=A() D,E=A() print((abs(B-D)+abs(C-E))/2)