#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;

constexpr char newl = '\n';

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int a, b, c, d, e, f;
    cin >> a >> b >> c >> d >> e >> f;

    assert(a == b);
    ld c2 = c, d2 = d, e2 = e, f2 = f;
    c2 /= a;
    d2 /= a;
    e2 /= a;
    f2 /= a;

    f2 += c2 * c2 / 4;
    f2 += d2 * d2 / 4;
    f2 -= e2;

    cout << fixed << setprecision(15) << sqrt(f2) << newl;

    return 0;
}