import math

x_1, y_1 = map(int, input().split())
x_2, y_2 = map(int, input().split())

dist_o = math.sqrt((x_1 - x_2) ** 2 + (y_1 - y_2) ** 2)
dist_m = abs(x_1 - x_2) + abs(y_1 - y_2)

f = abs(dist_o-dist_m)
print(f)