a, b, c, x, y = [int(elem) for elem in input().split()]

if 2 * c <= (a + b):
  min_ = min((x // 2), (y // 2))
  res1 = 4 * min_ * c + a * (x - 2 * min_) + b * (y - 2 * min_)
  if x > y:
    if x % 2 != 0:
      res2 = min(2 * x * c + a * (x % 2), 2 * (x + 1) * c)
    else:
      res2 = 2 * x * c
  else:
    if y % 2 != 0:
      res2 = min(2 * y * c + b * (y % 2), 2 * (y + 1) * c)
    else:
      res2 = 2 * y * c
  print(min(res1, res2)) 
else:
  print(a * x + b * y)