#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <regex>
#include <random>
#include <sstream>

#define ll long long
#define ld double
#define ull unsigned ll
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int> 
#define vi vector<int>
#define vll vector<ll>
#define vpii vector<pii>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
ll LINF = (ll)4e18;
ll mod = 998244353;
using namespace std;
const int INF = 1000 * 1000 * 1000;
const int N = 200005;


int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("sum.in", "r", stdin);
	//freopen("sum.out", "w", stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	cout.precision(20);
	cout.setf(ios::fixed);
	ld s, a, b, t;
	cin >> s >> a >> b >> t;
	int cur = 0;
	ll speed = 0;
	ld ans = 0;
	while (1) {
		if (!cur) speed += a;
		else speed += b;
		cur ^= 1;
		ld tt = min(t, s / speed);
		ans += tt * speed;
		t -= tt;
		if (t < 1e-9) break;
	}
	cout << ans;
	return 0;
}