5. When $n$ is a positive integer, the function $f$ satisfies $f(n+3)=\frac{f(n)-1}{f(n)+1}, f(1) \neq 0$ and $f(1) \neq \pm 1$, then the value of $f(8) \cdot f(2018)$ is $\qquad$
5. -1 From the given, we have $f(n+6)=-\frac{1}{f(n)}$, so $f(8) \cdot f(2018)=f(8) f(2)=-1$