import Control.Applicative
import Data.List
import Control.Monad

main = do
    [a,b,c,x,y] <- map read. words <$> getLine :: IO [Int]
    putStrLn.show $ answer a b c x y 

answer :: Int ->Int ->Int ->Int ->Int ->Int
answer a b c x y = calc `min` (a*x+b*y) where
    allC = 2*c * max x y
    xycount = min x y
    calc = 2*c * xycount + (a-xycount)*x + (b-xycount)*y