In the garden, there were three boxes of apples. Altogether, there were more than 150 apples, but less than 190. Maruška moved apples from the first box to the other two boxes so that the number of apples in each of these two boxes doubled compared to the previous state. Similarly, Marta moved apples from the second box to the first and third. Finally, Šárka moved apples from the third box to the first and second according to the same rules. When Vojta came to the garden, he was surprised that there were the same number of apples in each box.

How many apples were there in each of the boxes originally?

(L. Hozová)

Hint. In which box were there the most apples after the second move?
After the third transfer, there was the same number of apples in each box, which we denote as $x$. We will sequentially fill in the number of apples in each box from the back:

|  | 1st box | 2nd box | 3rd box |
| :--- | :---: | :---: | :---: |
| after 3rd transfer | $x$ | $x$ | $x$ |
| after 2nd transfer | $\frac{1}{2} x$ | $\frac{1}{2} x$ | $2 x$ |
| after 1st transfer | $\frac{1}{4} x$ | $\frac{7}{4} x$ | $x$ |
| originally | $\frac{13}{8} x$ | $\frac{7}{8} x$ | $\frac{1}{2} x$ |

The number of apples in each box after each transfer was an integer. Therefore, $x$ must be a multiple of eight, and $3 x$ (the total number of apples in all boxes) must be a multiple of 24.

Among the numbers from 151 to 189, the only multiple of 24 is 168. Thus, $x = 168 \div 3 = 56$, and the original number of apples in the boxes were:

$$
\frac{13}{8} \cdot 56 = 91, \quad \frac{7}{8} \cdot 56 = 49, \quad \frac{1}{2} \cdot 56 = 28.
$$

Note. If we consider the problem from the beginning, the number of apples in the boxes can be expressed step by step as follows:

|  | 1st box | 2nd box | 3rd box |
| :--- | :---: | :---: | :---: |
| originally | $a$ | $b$ | $c$ |
| after 1st transfer | $a - b - c$ | $2b$ | $2c$ |
| after 2nd transfer | $2a - 2b - 2c$ | $-a + 3b - c$ | $4c$ |
| after 3rd transfer | $4a - 4b - 4c$ | $-2a + 6b - 2c$ | $-a - b + 7c$ |

The equality of the number of apples in each box after the third transfer leads to a system of equations, which is challenging for solvers in this category. However, with the assumptions of the integrality of $a, b, c$ and the bounded sum $150 < a + b + c < 190$, this system has the unique solution mentioned above.