
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
  | x > y = minimum [2*c*x, 2*c*y + a*(x-y), a*x + b*y]
  | x < y = minimum [2*c*y, 2*c*x + b*(y-x), a*x + b*y]
  | otherwise = minimum [2*c*x, a*x + b*y]
