1. A1 (GBR 3) ${ }^{\mathrm{IMO}}$ The function $f(n)$ is defined for all positive integers $n$ and takes on nonnegative integer values. Also, for all $m, n$, 
$$ \begin{gathered} f(m+n)-f(m)-f(n)=0 \text { or } 1 \\ f(2)=0, \quad f(3)>0, \quad \text { and } \quad f(9999)=3333 \end{gathered} $$
Determine $f(1982)$.
1. From $f(1)+f(1) \leq f(2)=0$ we obtain $f(1)=0$. Since $0<f(3) \leq$ $f(1)+f(2)+1$, it follows that $f(3)=1$. Note that if $f(3 n) \geq n$, then $f(3 n+3) \geq f(3 n)+f(3) \geq n+1$. Hence by induction $f(3 n) \geq n$ holds for all $n \in \mathbb{N}$. Moreover, if the inequality is strict for some $n$, then it is so for all integers greater than $n$ as well. Since $f(9999)=3333$, we deduce that $f(3 n)=n$ for all $n \leq 3333$. By the given condition, we have $3 f(n) \leq f(3 n) \leq 3 f(n)+2$. Therefore $f(n)=[f(3 n) / 3]=[n / 3]$ for $n \leq 3333$. In particular, $f(1982)=$ $[1982 / 3]=660$.