main = do
  (a:b:c:x:y:xs) <- map read . words <$> getLine
  putStrLn . show $ solve a b c x y

solve a b c x y = (min x y) * (min (a+b) (c*2)) 
                + (min (if x>y then a else b) (c*2)) * (abs (x-y))