a,b,c,d,e,f = map(int,input().split()) r2 = f-e+(c**2)/(4*a)+(d**2)/(4*a) r = r2**(1/2) print(r)