#include #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair; int main() { double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; double r = sqrt(4*a*f - 4*a*e + c*c + d*d) / 2 / a; printf("%.5f\n", r); return 0; }