import java.util.*; public class Run { public static void main (String arg[]) { Scanner scan = new Scanner(System.in); double ans = 0; int A = scan.nextInt(); int B = scan.nextInt(); int X = scan.nextInt(); int Y = scan.nextInt(); double r = ((double) B)/A; double x = ((double) X); double y = X * r; if (Y < y) { y = Y; x = Y * (1/r); } ans = x + y; System.out.println(ans); } }