main :: IO ()
main = do
    [a, b, c, x, y] <- map read . words <$> getLine
    print $ solve a b c x y

solve :: Int -> Int -> Int -> Int -> Int -> Int
solve a b c x y = minimum $ cost <$> [0..((2*x) `max` (2*y))]
    where
        cost mixno = ano * a + bno * b + mixno * c
            where
                ano = (x - mixno `div` 2) `max` 0
                bno = (y - mixno `div` 2) `max` 0
