#include #include #include #include #include using namespace std; int main(int argc, char *argv[]) { cout.precision(10); long double vl, vr, d, w, ans = 0, a = 999; cin >> vl >> vr >> d >> w; while (a > 1.0e-11 && d > 1.0e-11) { long double a = (d * w) / (w + vr), t = a / w; ans += a; d -= t * (vl + vr); a = (d * w) / (w + vl), t = a / w; ans += a; d -= t * (vl + vr); } cout << ans << endl; return 0; }