Problem 10.7. At one meal, Karlson can eat no more than 5 kg of jam. If he opens a new jar of jam, he must eat it completely during this meal. (Karlson will not open a new jar if he has to eat more than 5 kg of jam together with what he has just eaten.)

Little Boy has several jars of raspberry jam weighing a total of 50 kg, each weighing no more than 1 kg. In the least number of meals, how many meals will Karlson definitely be able to eat all the jam?
Answer: 12.

Solution. We will prove that in 12 meals, Karlson will always be able to eat all the jam.

We will distribute the jars into piles according to the following algorithm. In each pile (starting with the first, then the second, and so on), we will place jars one by one until the pile contains more than 5 kg of jam. The last jar we place in the pile will be called the extra jar. Since Little has 50 kg of jam, there will be no more than 10 such piles.

Obviously, if we remove the extra jar from a pile, Karlson will be able to eat all the remaining jam in one meal. That is, Karlson will eat all the jam except the extra jars in 10 meals. And he will spend no more than 2 meals on the extra jars, as there are no more than 10 of them, and each weighs no more than 1 kg.

Now we will show that Karlson will not always be able to eat all the jam in 11 meals. Suppose there are a total of $5 \cdot 11 + 1 = 56$ jars, and each contains $\frac{25}{28}$ kg of jam. If Karlson managed to eat all of this in 11 meals, then by the pigeonhole principle, there would be a meal during which he ate at least 6 jars of jam. But $6 \cdot \frac{25}{28} = \frac{150}{28} > 5$, a contradiction.

Another construction example. We will demonstrate that Karlson will be able to eat at least $\frac{25}{6}$ kg of jam in one meal if there is at least that much jam left.

First, we will select jars one by one until we accumulate more than $\frac{25}{6}$ kg of jam. Then we will start returning the selected jars one by one so that the total remains at least $\frac{25}{6}$ kg of jam.

Suppose we can no longer return any of the selected jars, but the total amount of jam in them is still more than 5 kg. Clearly, then we have at least 6 jars, and the smallest of them contains no more than $\frac{1}{6}$ of the total mass of jam. We will select and return it; then there will be at least $\frac{5}{6} \cdot 5 = \frac{25}{6}$ kg of jam left. Contradiction. Therefore, Karlson can open and eat the remaining selected jars in one meal.

Thus, Karlson will be able to eat at least $\frac{25}{6}$ kg of jam in one meal, except for the last time when he finishes the remaining. Then, obviously, in $\frac{50}{\frac{25}{6}} = 12$ meals, he will manage.