#include #include using namespace std; int main() { double a,b,x,y; cin >> a >> b >> x >> y; if(x * b > y * a) cout << fixed << setprecision(10) << y * a / b + y << endl; else cout << fixed << setprecision(10) << x * b / a + x << endl; return 0; }