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