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

if C < A and C < B:
	if X>Y:
		print(C*X*2)
	else:
		print(C*Y*2)
elif A+B < C*2:
	print(A*X+B*Y)
else:
	if X>Y:
		print(Y*C*2+(X-Y)*A)
	else:
		print(X*C*2+(Y-X)*B)	

