1. Petya prints five digits on the computer screen, none of which are zeros. Every second, the computer removes the initial digit and appends to the end the last digit of the sum of the remaining four digits. (For example, if Petya enters 12345, after one second it will become 23454, then 34546, and so on. However, he can enter any five digits, not necessarily 12345.) At some point, Petya stops the process. What is the minimum possible sum of the five digits that could be on the screen at that moment?

(A. A. Tesler)
Answer: 2.

Solution. The record 00000 cannot appear on the screen, as it can only result from 00000. A record with four zeros and one also cannot appear, since in that case, the last digit would not equal the remainder of the division of the sum of the first four by 10.

However, a sum of digits equal to 2 is possible. For example, by working backwards, we can find an example of obtaining the record 00011 (or 10001):

$00011 \leftarrow 10001 \leftarrow 91000 \leftarrow 09100 \leftarrow 00910 \leftarrow 20091 \leftarrow 72009 \leftarrow 17200 \leftarrow 01720 \leftarrow 40172 \leftarrow$ $24017 \leftarrow 52401 \leftarrow 95240 \leftarrow 89524$.

Criteria. 5 points for the example, 2 points for the proof of the impossibility of smaller sums.