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