import sys
import math

str_in = sys.stdin.readlines()

x1, y1 = int(str_in[0].split()[0]), int(str_in[0].split()[1])
x2, y2 = int(str_in[1].split()[0]), int(str_in[1].split()[1])


e = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
m = abs(x1-x2) + abs(y1-y2)

res = abs(m - e)
print(f"{res:.6f}")