5. For any real numbers $a, b$, the inequality
$$
\max \{|a+b|,|a-b|,|2006-b|\} \geqslant c
$$

always holds, then the maximum value of the constant $c$ is $\qquad$ (where, $\max \{x, y, z\}$ denotes the maximum of $x, y, z$).
5.1003 .

Let $\max \{|a+b|,|a-b|,|2006-b|\}=M$, then $M \geqslant|a+b|, M \geqslant|a-b|, M \geqslant|2006-b|$.
Therefore, $4 M \geqslant|a+b|+|b-a|+2|2006-b|$
$$
\geqslant|(a+b)+(b-a)+2(2006-b)|=4012,
$$

which means $M \geqslant 1003$.
When $a=0, b=1003$, $M=1003$.
Thus, the minimum value of $M$ is 1003.
Therefore, the maximum value of $c$ is 1003.