1984 AIME Problem 7

The function f is defined on the set of integers and satisfies

f(n)= \begin{cases}n-3, & \text { if } n \geq 1000 \\ f(f(n+5)), & \text { if } n<1000\end{cases}

Find f(84).