You are buying two kinds of notebooks for school. A three-ring notebook costs $6, and a spiral notebook costs $3. You must have at least five notebooks. The cost of the notebooks can be no more than $24.