import Control.Monad
import Control.Applicative

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

solve a b c x y = if a+b <= c
  then a*x + b*y
  else 2 * c * min x y + let
    (z,d) = if x<y then (y-x,b) else (x-y,a)
    in if d <= 2*c then d*z else 2*c*z
