#include using namespace std; using ll = long long; #define rep(i, n) for(int i = 0; i < n; i++) int main() { double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; double x = c / a / 2; double y = d / a / 2; double r2 = f / a - e / a + x * x + y * y; cout << fixed << setprecision(12) << sqrt(r2) << endl; }