# coding:utf-8 A, B, X, Y = map(float, input().split()) if B/A*X>Y: print(A/B*Y+Y) else: print(B/A*X+X)