A 76-star flag has three rows of 8 stars, two rows of 6 stars and the rest are 5-star rows. How many rows of 5 stars are there altogether on the flag?
The rows of 8 stars have a total of: 3 rows * 8 stars/row = 
<gadget id="calculator">3*8</gadget>
<output>24</output>
24 stars.
The rows of 6 stars have a total of: 2 rows * 6 stars/row = 
<gadget id="calculator">2*6</gadget>
<output>12</output>
12 stars.
Including the rows of 8 and 6 stars, we have 24 stars + 12 stars = 
<gadget id="calculator">24+12</gadget>
<output>36</output>
36 stars.
Now we need to know how many stars are missing, 76 stars - 36 stars = 
<gadget id="calculator">76-36</gadget>
<output>40</output>
40 stars.
Now we need to distribute the missing stars in rows of 5 stars, 40 stars/5 rows = 
<gadget id="calculator">40/5</gadget>
<output>8</output>
8 rows of 5 stars.

<result>8</result>