A cat broke into a wine store at night. It jumped onto a shelf where bottles of wine were lined up in a long row - the first third of the bottles at the edge cost 160 Kč each, the next third cost 130 Kč each, and the last third cost 100 Kč each. First, the cat knocked over a 160 Kč bottle at the very beginning of the row, and then continued to knock over one bottle after another without skipping any. Before it got bored, it had knocked over 25 bottles, all of which broke. In the morning, the owner regretted that the cat had not started its mischief at the other end of the shelf. Even if it had broken the same number of bottles, the loss would have been 660 Kč less. How many bottles were originally on the shelf?

(L. Šimůnek)
In the problem statement, it is not specified in which third of the row the cat stopped knocking over bottles. We will consider each third as the one where the cat ended, and in each case, we will conclude whether it could have ended there or not.

If the cat stopped in the first third of the row, the damage from knocking over from the opposite end would be $25 \cdot 60 = 1500$ (CZK) less, because the difference in price between the most expensive and the cheapest bottle of wine is 60 CZK. The difference in damage in the problem statement is different, specifically 660 CZK. Therefore, the cat did not stop in the first third of the row.

If the cat knocked over more than one third but no more than two thirds of the row, it broke all the most expensive bottles and possibly a few mid-priced ones. If it proceeded from the opposite end, it would have eliminated the same number of mid-priced bottles and instead of all the most expensive ones, it would have broken all the cheapest ones. The difference in damage thus corresponds to the number of bottles forming one third of the row multiplied by 60 CZK. One third of the row would thus consist of $660 : 60 = 11$ bottles, and the total number of bottles would be $3 \cdot 11 = 33$. According to the problem statement, the cat knocked over 25 bottles, which is more than two thirds of the total 33 bottles. The condition stated at the beginning of this paragraph is not met, and therefore the cat could not have stopped in the second third of the row.

If the cat knocked over more than two thirds of the bottles, only a few of the cheapest ones remained. If it had knocked over from the opposite end, the same number of the most expensive bottles would have remained untouched. The difference in damage corresponds to the number of untouched bottles multiplied by 60 CZK. There must have been $660 : 60 = 11$ untouched bottles, and the total number of bottles $11 + 25 = 36$. This means that the cat knocked over all 12 of the most expensive bottles $(36 : 3 = 12)$, all 12 mid-priced ones, and one of the cheapest. This solution fits.

There were originally 36 bottles on the shelf.