import Data.List

toInt :: String -> Int
toInt = read :: String -> Int

main = do
  [a, b, c, x, y] <- map toInt . words <$> getLine
  print $ minimum [a*x+b*y, c*x*2+b*(max (y-x) 0), a*(max (x-y) 0)+c*y*2]
