module Main where

solve :: (Int,Int,Int,Int,Int) -> Int
solve (a,b,c,x,y)
    | x > y     =   minimum [a*x+b*y,2*c*y+a*(x-y),2*c*x]
    | otherwise =   minimum [a*x+b*y,2*c*x+b*(y-x),2*c*y]


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