A, B, C, X, Y = map(int, input().split())
pizza = [A, B, C]
count = [X, Y]
price = 0
print(pizza, count, price)
if pizza[0]+pizza[1] >= 2 * pizza[2]:
	tmp = min(count)
	price += 2 * tmp * pizza[tmp]
	count[count.index(tmp)] = 0
	count[count.index(max(count))] -= tmp

for i in count:
	price += pizza[count.index(i)] * i

print(price)