8. Find the minimum value of $|x-1|+|x-2|+|x-3|+\cdots$ $+|x-1996|$.
8. When $998 \leqslant x \leqslant 999$, the original expression has a minimum value, the minimum value is:
$$
\begin{array}{l}
(1996-1)+(1995-2)+\cdots+(999-998) \\
=1995+1993+\cdots+1 \\
=\frac{(1+1995) \times 998}{2}=998^{2}=996004 .
\end{array}
$$