f=lambda:map(int,input().split()) *p,=f() *q,=f() t=(abs(p[0]-q[0])+abs(p[1]-q[1]))/2 print(int(t) if t==int(t) else t)