a,b=map(int,input().split())
c,d=map(int,input().split())
E=((a-c)**2+(b-d)**2)**0.5
M=((a-c)**2)**0.5+((b-d)**2)**0.5
Z=((E-M)**2)**0.5
print(Z)