p = list(map(int, input().split())) q = list(map(int, input().split())) print((abs(p[0] - q[0]) + abs(p[1] - q[1])) / 2)