3. Define the function $f$ on the positive integers such that

$$
f(1)=1, \quad f(3)=3
$$

and

$$
\begin{aligned}
f(2 n) & =f(n) \\
f(4 n+1) & =2 f(2 n+1)-f(n) \\
f(4 n+3) & =3 f(2 n+1)-2 f(n)
\end{aligned}
$$

for all positive integers $n$.

Determine the number of integers $n$ in the range $1 \leq n \leq 1988$ for which $f(n)=n$ holds.