from decimal import Decimal as d xa,ya=map(d,input().split()) xb,yb=map(d,input().split()) def f(yp): s=d('2') AP=(xa**s+(yp-ya)**s).sqrt() BP=(xb**s+(yp-yb)**s).sqrt() return (AP+BP) low,high=d('-1000'),d('2000') D=d('10')**d('-9') while(high-low)>D: l2=(low*d('2')+high)/d('3') h2=(low+high*d('2'))/d('3') if f(l2)>f(h2): low=l2 else: high=h2 print(low)