#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; printf("%.10f\n", sqrt(f - e + c * c / 4.0 + d * d / 4.0)); return 0; }