using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using static System.Math; namespace SortItems { class Program { static void Main(string[] args) { var n = Console.ReadLine().Split().Select(double.Parse).ToArray(); double a = n[0]; double b = n[1]; double x = n[2]; double y = n[3]; if (x * b / a > y) { Console.WriteLine(y + (y * (a / b))); } else { Console.WriteLine(x + (x * (b / a))); } } } }