2・15 Write the numbers $1,2,3, \cdots, 1986,1987$ on the blackboard. At each step, erase some of the numbers and replace them with the remainder of their sum divided by 7. After several steps, two numbers remain on the blackboard, one of which is 987. What is the second remaining number?
(13th All-Russian Mathematical Olympiad, 1987)
[Solution] Clearly, at each step, the sum of the numbers written down retains the remainder when divided by 7.
Let the remaining number be $x$, then $x+987$ equals the sum
$$
1+2+\cdots+1986+1987=1987 \cdot 7 \cdot 142
$$

divided by 7, which is 0.
Since 987 is divisible by 7, then $x$ is also divisible by 7.
Since the number 987 is not the remainder when divided by 7, $x$ must be the remainder when divided by 7, i.e., it satisfies $0 \leqslant x<6$, so
$$
x=0 \text {. }
$$