import qualified Data.ByteString.Char8 as C
import Data.Maybe ( fromJust )

readInts :: IO [Int]
readInts = map (fst . fromJust . C.readInt) . C.words <$> C.getLine

main :: IO ()
main = do
  as <- readInts
  print $ h as

-- https://atcoder.jp/contests/arc096/submissions/2397049
h :: [Int] -> Int
h as@[a,b,c,x,y]
  = minimum [bAB, bC, bAC, bBC]
  where
    bAB = a*x + b*y
    bC  = 2*c*(max x y)
    bAC = 2*c*x + b*(max 0 (y-x))
    bBC = a*(max 0 (x-y)) + 2*c*y
