#include<bits/stdc++.h>
#define FOR(i,a,b) for(int i = a; i < b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define pi pair<int, int>
#define ppi pair <pi, pi>
#define vi vector<int>
#define vvi vector<vi>
#define fi first
#define se second
#ifndef DEBUG
#define endl (char)10
#endif
using namespace std;
using ll = long long;
using ld = long double;

int main (){
	ios_base::sync_with_stdio(false); cout.tie(0); cin.tie(0);
	//init();
	ld T[6];
	FOR(i,0,6) cin >> T[i];
	ld tthd = sqrt(2 * (T[2] - T[5]));
	ld xohd = T[1] * tthd;
	ld tfdtx = T[3] - T[0] + xohd / T[4];
	cout << fixed << setprecision(22);
	if (tfdtx <= tthd){
		cout << T[0] + tthd + xohd / T[4] << endl;
		return 0;
	}
	ld ttref = sqrt(2 * T[2]);
	ld endx = T[1] * ttref;
	ld ttre = T[3] - T[0] + endx / T[4];
	if (ttre > ttref){
		cout << T[0] + ttre + endx / T[4] << endl;
		return 0;
	}
	ld ct = (T[3] - T[0]) * T[1] / (T[4] - T[1]);
	cout << T[0] + 2 * ct + T[3] - T[0] << endl;
	return 0;
}
