main :: IO ()
main = do
  [a, b, c, x, y] <- map read . words <$> getLine :: IO [Int]
  let c' = 2 * c
  if a + b <= c'
    then print $ a * x + b * y
    else
      let d = if x > y then a else b
          z = abs $ x - y
      in print $ 2 * min x y * c + min d c' * z
