#include <iostream> 
#include <iomanip>
#include <cmath>
#include <limits>
using namespace std;

int main() {
  ios::sync_with_stdio(0); cin.tie(0);
  double a,b,c,d,e,f;
  cin >> a >> b >> c >> d >> e >> f;
  double m = (c/(2.0 * sqrt(a))); //sqrt(a) = n
  double q = (d/(2.0 * sqrt(b))); //sqrt(b) = l
  cout << fixed << setprecision(5) << sqrt((m*m)+(q*q)+f-e) << endl;
  return 0;
}