from math import sqrt x_1,y_1 = input().split() x_2,y_2 = input().split() x_1 = float(x_1) x_2 = float(x_2) y_1 = float(y_1) y_2 = float(y_2) d_e = ((x_1-x_2) ** 2+(y_1-y_2)**2) ** (1/2) d_m = abs(x_1 - x_2) + abs(y_1 - y_2) delt = abs(float(d_e) - float(d_m)) print(delt)