// should be WA #include using namespace std; int main(){ double A, B, X, Y; cin >> A >> B >> X >> Y; cout << setprecision(6) << (A + B) * min(X/A, Y/B) << endl; }