main = do
  [a, b, c, x, y] <- map (read :: String -> Int) <$> words <$> getLine
  let ab = a + b
  let c' = c * 2
  putStrLn $ show $ (min x y) * (min ab c') + if x > y then (min a c') * (x -y) else (min b c') * (y-x)