package m.shin; import java.util.Scanner; public class Con236 { public static void main(String[] args) { Scanner s = new Scanner(System.in); double a = s.nextDouble() , b = s.nextDouble() ,x = s.nextDouble() , y = s.nextDouble(); s.close(); if(x / a * b >= y){ System.out.println(y + y * a / b); }else{ System.out.println(x + x * b / a); } } }