ax,ay = map(int,input().split()) bx,by = map(int,input().split()) mx,my = abs(ax - bx) / 2,abs(ay - by) / 2 t = mx + my if t % 1 == 0: t = int(t) print(t)