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

pi = {'A':A, 'B':B, 'C':C}
buy = {'A':X, 'B':Y}
if X < Y:
	low, high = 'A','B'
else:
	low, high = 'B','A'

ans=0
if A+B >= 2*C:
	if A >= C and B >= C:
		ans+=(2*C)*buy[high]
	else:
		ans += (2*C)*buy[low] + (pi[high])*(buy[high]-buy[low])
elif A <= 2*C and B <= 2*C:
	ans = A*X + B*Y
elif A > 2*C:
	ans = (2*C)*X + B*Y
else:
	ans = A*X + (2*C)*Y

print(ans)