#include using namespace std; int main() { int a, b, x, y; cin >> a >> b >> x >> y; if ( a * y > b * x ) { cout << x * (1.0 * a + b) / a << endl; } else { cout << y * (1.0 * a + b) / b << endl; } }