In Zverimex, they were selling fish from one aquarium. Ondra wanted half of all the fish, but to avoid cutting any fish, he received half a fish more than he requested. Matěj wished for half of the remaining fish, but like Ondra, he received half a fish more than he requested. Finally, Petr wanted half of the remaining fish, and he also received half a fish more than he requested. After that, the aquarium was empty.

How many fish were originally in the aquarium, and how many did Ondra, Matěj, and Petr get?

(M. Volfová)
Let's consider it from the end:

Petr got half a fish more than half of all the fish that remained after Matej. Since the aquarium was then empty, that half a fish more was exactly half of what remained after Matej. Therefore, after Matej's purchase, one fish remained in the aquarium.

Matej got half a fish more than half of all the fish that remained after Ondřej. Since one fish remained in the aquarium after Matej's purchase, this fish and the half a fish more were exactly half of what remained after Ondřej. After Ondřej's purchase, three fish remained in the aquarium.

Ondřej got half a fish more than half of all the fish that were originally in the aquarium. Since three fish remained in the aquarium after Ondřej's purchase, these three fish and the half a fish more were exactly half of the original number of fish. Originally, there were seven fish in the aquarium. Thus, Ondřej got four fish, Matej got two, and Petr got one fish.

Scoring suggestion. 1 point for determining the remainder after Matej; 2 points for determining the remainder after Ondřej; 3 points for determining the original number and the number of fish each boy took.

Another solution. If we denote the original number of fish in the aquarium as $x$, then we can express the subsequent numbers as follows:

|  | got | remained |
| :---: | :---: | :---: |
| Ondřej | $\frac{x+1}{2}$ | $\frac{x-1}{2}$ |
| Matej | $\frac{x+1}{4}$ | $\frac{x-3}{4}$ |
| Petr | $\frac{x+1}{8}$ | $\frac{x-7}{8}$ |

From this, it is clear that the aquarium could be empty after Petr's purchase only if $x=7$. By substitution, we can easily determine the number of fish each boy took.

Scoring suggestion. 2 points for the second-to-last row of the table; 2 points for the last row of the table; 1 point for solving the unknown; 1 point for the number of fish for each boy.