#include #define rep(i,n) for (int i=0; i < (n); i++) using namespace std; using ll = long long; int main(){ // ios::sync_with_stdio(false); int a,b,c,d,e,f; cin>>a>>b>>c>>d>>e>>f; cout << std::fixed << std::setprecision(20); double r = f - e + (c*c)/4.0/(double)a/(double)a + (d*d)/4.0/(double)b/(double)b ; r = sqrtl(r); cout << r << endl; }