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