a, b, c, x, y = map(int, input().split())

price = 0

if a + b <= 2 * c:
    price = a * x + b * y
elif a >= 2 * c and b >= 2 * c:
    price = 2 * c * max(x, y)
elif a >= 2 * c:
    price = 2 * c * x + b * max(y - x, 0)
elif b >= 2 * c:
    price = 2 * c * y + b * max(x - y, 0)
else:
    price = 2 * c * min(x, y)
    if x > y:
        price += a * (x - y)
    else:
        price += b * (y - x)


print(price)