f a b c x y = minimum [abOnly, abNasi, ababab, aToab, bToab]
  where
    abOnly = 2 * c * max x y
    abNasi = a * x + b * y
    ababab = if x > y
               then 2 * c * y + a * (x - y)
               else 2 * c * x + b * (y - x)

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