#include<iostream> #include<cmath> using namespace std; double a,b,c,d,e,f; main() { cin>>a>>b>>c>>d>>e>>f; cout<<sqrt(f-e+c*c/a/4+d*d/b/4)<<endl; }