a,b,c,d,e,f = gets.split.map(&:to_f) r =(f-e+a*(c/(2*a))**2+b*(d/(2*b))**2)/a r = Math.sqrt(r) puts sprintf("%10.16f",r)