main = do
    [a, b, c, x, y] <- map read . words <$> getLine
    let ab = a * x + b * y
    let cx = 2 * x * c + (if x < y then b * (y - x) else 0)
    let cy = 2 * y * c + (if x > y then a * (x - y) else 0)
    print $ minimum [ab, cx, cy]
