main :: IO ()
main = do
  [a,b,c,x,y] <- map read.words <$> getLine :: IO [Integer]
  let f cnt minPrice = min minPrice $ cnt*c*2 + a*max 0 (x-cnt) + b*max 0 (y-cnt)
  print $ foldr f (a*x+b*y) [0..max x y]
