f :: (Ord a, Num a) => (a, a, a, a, a) -> a
f (a,b,c,x,y) = if x > y
                then foldr1 min [a*x+b*y, 2*c*y+a*(x-y), 2*c*x]
                else foldr1 min [a*x+b*y, 2*c*x+b*(y-x), 2*c*y]

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