import math P = list(map(int, input().split())) Q = list(map(int, input().split())) x = Q[0] - P[0] y = Q[1] - P[1] if x < 0: x *= -1 if y < 0: y *= -1 ans = (x + y) / 2 if (x + y) % 2 == 1: print(ans) else: ans = (x + y) / 2 print(math.ceil(ans))