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

if A + B > C * 2:
	if X > Y:
		total = (X-Y)*A + 2*Y*C
	else:
		total = (Y-X)*B + 2*X*C
else:
	total = X * A + Y * B

print(total)