import java.util.Scanner;


public class Main_yukicoder236 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        double ret = 0;
        if (y * a > x * b) {
        	ret = (double)x * b / a + x;
        } else if (y * a < x * b) {
        	ret = (double)y * a / b + y;
        } else {
        	ret = x + y;
        }
        
        System.out.printf("%.7f\n", ret);
        
        sc.close();
    }
}