#include int main() { double a, b, x, y; scanf("%lf %lf %lf %lf", &a, &b, &x, &y); if (x * (b / a) > y) printf("%.7lf\n", y + y * (a / b)); else printf("%.7lf\n", x + x * (b / a)); return 0; }