import math def solve(): p = input().split(' ') px = int(p[0]) py = int(p[1]) q = input().split(' ') qx = int(q[0]) qy = int(q[1]) t = getDistance(px, py, qx, qy) dx = t[0] / 2 dy = t[1] / 2 if (t[0] % 2 != 0 and t[1] % 2 != 0): dx = math.ceil(dx) dy = math.floor(dy) print(dx + dy) def getDistance(x1, y1, x2, y2): return (abs(x2 - x1), abs(y2 - y1)) solve()