main = do
  [a,b,c,x,y] <- fmap (map read . words) getLine
  print (solve a b c x y)


solve :: Int -> Int -> Int -> Int -> Int -> Int
solve a b c x y =
  minimum [buyAB, buyC, buyAC, buyBC]
  where
    buyAB  = a*x + b*y
    buyC   = (max x y)*2*c
    buyAC  = 2*c*x + b*(max 0 (y-x))
    buyBC  = a*(max 0 (x-y)) + 2*c*y