px,py=map(int,input().split()) qx,qy=map(int,input().split()) d=abs(px-qx)+abs(py-qy) v=0.5 if d%2==1 else 0 print(d//2+v)