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

cost = 0
for i in range(min(x, y)):
    if a + b > 2 * c:
        cost += 2 * c
    else:
        cost += a + b

for i in range(abs(x - y)):
    if a < 2 * c:
        cost += a
    elif b < 2 * c:
        cost += b
    else:
        cost += 2 * c

print(cost)