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