using System;
using System.Linq;
using System.Collections.Generic;

public class yukicoder
{
    public static void Main()
    {
		double[] input = Console.ReadLine().Split(' ').Select(c => double.Parse(c)).ToArray();
		double a = input[0];
		double b = input[1];
		double x = input[2];
		double y = input[3];
		
		if(x * b / a > y)
		{
			Console.WriteLine(y + (y * a / b));
		}
		else
		{
			Console.WriteLine(x + (x * b / a));
		}
    }
}