l = list(map(int,input().split()))
A = l[0]
B = l[1]
C = l[2]
X = l[3]
Y = l[4]
Z = 0
total = 0
a = []

for i in range(X+1):
	p = X-i
	for j in range(Y+1):
		q = Y-j
		total = p*A + q*B + max(i,j)*2*C
		a.append(total)

print(min(total))