3. (20 points) During the draw before the math marathon, team captains were asked to name the smallest possible sum of the digits in the decimal representation of the number $n+1$, given that the sum of the digits of the number $n$ is 2017. What was the answer given by the captain of the team that won the draw?
Answer: 2.

Solution: First, we show that the answer is not less than 2. If the sum of the digits of the number $n+1$ is 1, then $n+1=10 \ldots 0$, and the decimal representation of $n$ consists entirely of nines. Then the number $n$ is divisible by 9, and the sum of its digits, therefore, is also. But this is impossible since 2017 is not divisible by 9.

It remains to provide an example of a number $n+1$ whose sum of digits is 2. Since $2017=224 \cdot 9+1$, we can set $n=19 \ldots 9$, where the digit 9 is repeated 224 times. Indeed, in this case, $n+1=20 \ldots 0$.