#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount #define popcountll __builtin_popcountll using namespace std; typedef long long int ll; typedef pair P; int main() { double a, b, c, d, e, f; cin>>a>>b>>c>>d>>e>>f; c/=a, d/=a, e/=a, f/=a; double r=f-e+c*c/4+d*d/4; r=sqrt(r); printf("%.7lf\n", sqrt(abs(a))*r); return 0; }