#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; if (a < 0) { a *= -1; b *= -1; c *= -1; d *= -1; e *= -1; f *= -1; } double r = sqrt(4*a*f - 4*a*e + c*c + d*d) / 2 / a; printf("%.5f\n", r); return 0; }