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