#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) signed main() { int A,B,X,Y; cin>>A>>B>>X>>Y; double coffee = min(1.0 * X, 1.0 * Y * A / B); printf("%.14f\n", coffee * (1.0 + 1.0 * B / A)); return 0; }