import java.util.*; import java.lang.*; import java.io.*; class Ideone{ public static void main(String[] args) throws Exception{ // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] lines = br.readLine().split(" "); double a = Double.parseDouble(lines[0]); double b = Double.parseDouble(lines[1]); double x = Double.parseDouble(lines[2]); double y = Double.parseDouble(lines[3]); if(a*y > b*x){ System.out.println(x + x*a/b); }else{ System.out.println(y + y*a/b); } } }