#include #include #include #include #include #include #include #include #include #include #include #include #define mod 1000000007; using namespace std; typedef long long ll; typedef pair Pr; ll vl, vr,d,w; int main() { cin >> vl >> vr >> d >> w; double t = 0,dd; while (d > 0) { if (d - vr >= 0) d -= vr; else { dd = vr; break; } if (d - vl >= 0) d -= vl; else { dd = vl; break; } t++; } if (d != 0) { t += (double)d / (vr + vl); } printf("%.10f\n",t*w); return 0; }