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