6・17 Function $f$ is defined on the set of integers, and satisfies
$$
f(n)=\left\{\begin{array}{l}
n-3, \quad \text { when } n \geqslant 1000 ; \\
f(f(n+5)), \quad \text { when } n<1000 .
\end{array}\right.
$$

Find $f(84)$.