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