5. Given an even function $f: \mathbf{Z} \rightarrow \mathbf{Z}$ that satisfies $f(1)=1$, $f(2007) \neq 1$, and for any integers $a, b$, 
$$
f(a+b) \leqslant \max \{f(a), f(b)\} \text {. }
$$

Then the possible value of $f(2008)$ is $\qquad$
5.1.

Since $f(2) \leqslant \max \{f(1), f(1)\}=1$, assume for a positive integer $k$ greater than or equal to 2, we have $f(k) \leqslant 1$, then
$$
f(k+1) \leqslant \max \{f(k), f(1)\}=1 \text {. }
$$

Therefore, for all positive integers $n$, we have $f(n) \leqslant 1$.
Since $f$ is an even function, we can conclude that for all non-zero integers $n$, we have $f(n) \leqslant 1$.
Since $f(2007) \neq 1$, it follows that $f(2007)<1$.
Thus, $1=f(1)=f(2008+(-2007))$
$\leqslant \max \{f(2008), f(-2007)\} \leqslant 1$.

Since $f(-2007)=f(2007)<1$, it must be that $f(2008)=1$.