A,B,C,X,Y = map(int,input().split())

sum = 0
if (A+B) > 2*C:
	for i in range(min(X,Y)):
		sum += 2*C

	if X > Y:
		if A > 2*C:
			for i in range(X-Y):
				sum += 2*C
		else:
			for i in range(X-Y):
				sum += A

	if X < Y:
		if B > 2*C:
			for i in range(X-Y):
				sum += 2*C
		else:
			for i in range(X-Y):
				sum += B

if (A+B) <= 2*C:
	for i in range(min(X,Y)):
		sum += (A+B)

	if X > Y:
		if A > 2*C:
			for i in range(X-Y):
				sum += 2*C
		else:
			for i in range(X-Y):
				sum += A

	if X < Y:
		if B > 2*C:
			for i in range(X-Y):
				sum += 2*C
		else:
			for i in range(X-Y):
				sum += B

print(sum)