#include #include using namespace std; int main() { long double vl, vr, d, w, ans = 0; cin >> vl >> vr >> d >> w; int i = 0; while (d > 0.000001 && i < 100000000) { long double t1 = d / (w + vr); ans += w * t1; d -= (vl + vr) * t1; long double t2 = d / (w + vl); ans += w * t2; d -= (vl + vr) * t2; i++; } cout << fixed << setprecision(9) << ans << endl; return 0; }