You can buy 5 more bagels because if you divide 18 by $12.99 you get 1.385, which would be the price of each bagel. Then you will have about $7.01 left. Now divide $7.01 by 1.385 and it will give you 5.06 bagels. Therefore 18 bagels plus 5 bagels is 23 bagels and so you can buy 23 bagels in total.