import Control.Applicative
import Control.Monad


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


solve a b c x y =
  minimum p
  where
    ab = c*((min x y)*2)
    p =  [a*x+b*y,
          ab + if(x>y) then (x-y)*a else (y-x)*b,
          c *(x+y)
         ]
   
 
