from math import sqrt
a,b,c,d,e,f=map(int,input().split())
if a<0:
    a,b=-a,-b
c/=a
d/=a
e/=a
f/=a
print(sqrt((c**2+d**2)-4*(e-f))/2)