6. The numbers $1,2, \ldots, 2016$ are written on a board. It is allowed to erase any two numbers and replace them with their arithmetic mean. How should one proceed to ensure that the number 1000 remains on the board?
6. Solution. We will first act according to the following scheme: $1,2,3, \ldots, n-3, n-2, n-1, n \rightarrow 1,2,3, \ldots, n-3, n-1, n-1 \rightarrow 1,2,3, \ldots, n-3, n-1$. Acting in this way, we will arrive at the set $1,2,3, \ldots, 1000,1002$. Then we will act according to the same scheme from the other end:

\[
\begin{aligned}
& 1,2,3, \ldots, 1000,1002 \rightarrow 2,2,4, \ldots, 1000,1002 \rightarrow 2,4,5, \ldots, 1000,1002 \rightarrow 3,5, \ldots, 1000,1002 \\
& \rightarrow 4,6, \ldots, 1000,1002 \rightarrow 5,7, \ldots, 1000,1002 \rightarrow \ldots \rightarrow 997,999,1000,1002 \rightarrow 998,1000,1002 \\
& \rightarrow 1000,1000 \rightarrow 1000
\end{aligned}
\]

Grading criteria. Correct algorithm - 7 points. In other cases - 0 points.