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