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