import java.util.Scanner; public class Main { 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 max=0; if(A*Y<=B*X){ max=Y*(A+B)/B; }else if(A*Y>B*X){ max=X*(A+B)/A; } System.out.println(max); } }