a,b,c,d,e,f=map(int,input().split()) if a<0: ans=(4*a*(f-e)+c*c+d*d)**0.5 ans/=-2*a else: ans=(4*a*(f-e)+c*c+d*d)**0.5 ans/=2*a print(ans)