A function $f$ is defined on the positive integers by \[ \left\{ \begin{array}{rcl} f(1) &=& 1, \\ f(3) &=& 3, \\ f(2n) &=& f(n), \\ f(4n+1) &=& 2f(2n+1)-f(n), \\ f(4n+3) &=& 3f(2n+1)-2f(n), \end{array} \right. \] for all positive integers $n$. Determine the number of positive integers $n$, less than or equal to 1988, for which $f(n) = n$.

Let's think step by step and output the final answer within \boxed{}.
user