main :: IO ()
main = do
  [a, b, c, x, y] <- map read . words <$> getLine
  print . minimum $ if x > y
                    then [a*x + b*y, 2*c*y + (x-y)*a, 2*c*x]
                    else [a*x + b*y, 2*c*x + (y-x)*b, 2*c*y]