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

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