A,B,C,X,Y = map(int,input().split())
m = min(X,Y)
m2 = max(X,Y)
if (A+B)/2 > C and m > 1:#できるだけCを買う方がお得
	ans = C*2*m
	if X>Y:
		ans += A*(X-Y)
	else:
		ans += B*(Y-X)
	if ans > C*2*m2:
		print(C*2*m2)
	else:
		print(ans)

else:
	print(A*X+B*Y)
