import sys
readline=sys.stdin.readline

Px,Py=map(int,readline().split())
Qx,Qy=map(int,readline().split())
ans=(abs(Px-Qx)+abs(Py-Qy))/2
print(ans)