xa,ya=map(int,input().split()) xb,yb=map(int,input().split()) def f(yp): AP=xa**2+(yp-ya)**2 BP=xb**2+(yp-yb)**2 return AP+BP low,high=0,1000 while(high-low>10**(-8)): l2=(low*2+high)/3 h2=(low+high*2)/3 if f(l2)>f(h2): low=l2 else: high=h2 print(low)