To buy a book, you pay $20 for each of the first 5 books at the supermarket, and for each additional book you buy over $20, you receive a discount of $2. If Beatrice bought 20 books, how much did she pay at the supermarket?
For the first five books, the total cost is $20*5 = $
<gadget id="calculator">20*5</gadget>
<output>100</output>
100.
For every additional book over $5, you pay $2 less, totaling to $20-$2 = $18.
Beatrice bought 20 books, so the number of books at which she received the $2 discount is 20-5 = 
<gadget id="calculator">20-5</gadget>
<output>15</output>
15 books.
For the 15 books, Beatrice paid 15*$18 = $
<gadget id="calculator">15*18</gadget>
<output>270</output>
270.
In total, Beatrice paid $100+$270 = $
<gadget id="calculator">100+270</gadget>
<output>370</output>
370 for the 20 books.

<result>370</result>