#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; int main(){ int A, B, X, Y; cin >> A >> B >> X >> Y; double ans = 0.0; if(A*Y >= B*X){ ans = (double)X + (double)X*B/A; }else{ ans = (double)Y + (double)Y*A/B; } cout << setprecision(10) << ans << endl; }