The function G(N) is such that:
G(N) = N-3, if N ≥ 1000, and:
G(N) = G(G(N+5)), if N < 1000
where, N is an integer.
Find G(84)
G(999) = G(G(1004)) = G(1001) = 998
G(998) = G(G(1003)) = G(1000) = 997
G(997) = G(G(1002)) = G(999) = 998
G(996) = G(G(1001)) = G(998) = 997
G(995) = G(G(1000)) = G(997) = 998
G(994) = G(G(999)) = G(998) = 997
and so forth
If N < 1000,
then G(N) = if N is odd, then 998
= if N is even, then 997
So, G(84) = 997