We have five, each a 15-liter container, in which there are 1, 2, 3, 4, 5 liters of water respectively. In one step, we can double the content of a selected container by pouring a part of the water from another container into it. What is the maximum amount of water that can be collected in a single container this way?
Solution. At each step, we pour one liter of water from one container to another, so since the measurement in liters of the contents of the containers was initially an integer, it remains an integer. In each step, the content of two containers changes: the content of one increases - it doubles - while the content of the other decreases by the content of the first container. Since we cannot get 15 liters of water either by doubling or by decreasing, the maximum amount of water that can be collected in one container is 14 liters.

The table below shows how 14 liters of water can be collected in the prescribed manner.

|  | I. container | II. container | III. container | IV. container | V. container |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Before 1st step | 5 | 3 | 1 | 4 | 2 |
| After 1st step | 5 | 1 | 1 | 4 | 4 |
| After 2nd step | 1 | 1 | 1 | 4 | 8 |
| After 3rd step | 1 | 1 | 2 | 4 | 7 |
| After 4th step | 0 | 2 | 2 | 4 | 7 |
| After 5th step | 0 | 0 | 4 | 4 | 7 |
| After 6th step | 0 | 0 | 0 | 8 | 7 |
| After 7th step | 0 | 0 | 0 | 1 | $\mathbf{1 4}$ |