A,B,X,Y = map(int,input().split()) if (B*X-A*Y)>=0: print(Y*(1+A/B)) else: print(X*(1+B/A))