#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 <stack>
#include <memory.h>
#include <list>
#include <numeric>
#include <functional>
#include <complex>
#include <cassert>
#include <regex>
#include <random>
#include <fstream>

#define ll long long
#define ld long double
#define ull unsigned ll
#define mp(xx, yy) make_pair(xx, yy)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pii pair<int,int> 
#define pll pair<ll, ll> 
#define vi vector<int>
#define vll vector<ll>
#define vpii vector<pii>
#define vpll vector<pll>
#define vvi vector<vector<int>>
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
#define endl '\n'
ld pi = acos(-1.0);
const int mod = 1e9 + 7;
using namespace std;


int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	cout.precision(6);
	double s, a, b, t;
	cin >> s >> a >> b >> t;
	double u = a, ans=0, tm=0;
	int g = 0;
	while (1) {
		double x = s / u;
		if (tm + x >= t) {
			ans += (t - tm) * u;
			break;
		}
		ans += s;
		tm += x;
		if (g % 2) {
			u += a;
		}
		else u += b;
		if (g)
			g = 0;
		else g = 1;
	}
	cout<<fixed << ans;
	return 0;
}
