# -*- coding: utf-8 -*-
a, b, c, x, y = map(int, input().split())

total = a * x + b * y
c_total = 2 * c * min(x, y)
if total > c_total:
  total = c_total
  if x > y:
    total += c_total + (x - y) * min(a, 2 * c)
  elif y > x:
    total += c_total + (y - x) * min(b, 2 * c)
print(total)
