#include #define rep(i,n) for(int i=0;i<(n);++i) #define all(a) (a).begin(),(a).end() using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); double a, b, x, y; cin >> a >> b >> x >> y; if (x / a <= y / b) { cout << fixed << setprecision(8) << x + x * (b / a) << endl; } else { cout << fixed << setprecision(8) << y + y * (a / b) << endl; } return 0; }