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