import Control.Monad
import Text.Printf
import Control.Applicative
import Data.List as L

main :: IO()
main = do
  [a, b, c, x, y] <- map read . words <$> getLine
  printf "%d" $ slv a b c x y

slv :: Int -> Int -> Int -> Int -> Int -> Int
slv a b c x y = minimum [cost1, cost2, cost3]
  where cost1 = 2 * c * max x y
        cost2 = x * a + b * y
        cost3 = 2 * c * min x y + (x - min x y) * a + (y - min x y) * b