F7 (23-1, UK) Let the function $f(n)$ be defined on the set of positive integers and take non-negative integer values, $f(2)=0, f(3)>0, f(9999)=3333$, and for all $m, n$, $f(m+n)-f(m)-f(n)=0$ or 1.

Find the value of $f(1982)$.
Given the known conditions,
$$
f(m+n) \geqslant f(m)+f(n).
$$

Let $m=n=1$, we get $f(2) \geqslant 2 f(1)$, but $f(2)=0$ and $f(1)$ is a non-negative integer, so $f(1)=0$.
Let $m=2, n=1$, we get
$$
f(3)=f(2)+f(1)+(0 \text{ or } 1)=0 \text{ or } 1,
$$

Since $f(3)>0$, we have $f(3)=1$.
We now prove: For $k \leqslant 3333$, $f(3 k)=k$.
Using (1), we can get
$$
\begin{aligned}
f(3 k) & \geqslant f[3(k-1)]+f(3) \\
& \geqslant f[3(k-2)]+2 f(3) \\
& \geqslant \cdots \geqslant k f(3) \\
& =k.
\end{aligned}
$$

If $f(3 k)>k$, then $f(3 k) \geqslant k+1$, thus
$$
\begin{aligned}
f(9999) & \geqslant f(9999-3 k)+f(3 k) \\
& \geqslant 3333-k+k+1 \\
& >3333,
\end{aligned}
$$

which contradicts the given condition. Hence, $f(3 k)=k$.
Therefore, $1982=f(3 \times 1982) \geqslant 3 f(1982)$, which means
$$
f(1982) \leqslant \frac{1982}{3}<661.
$$

Also,
$$
f(1982) \geqslant f(3 \times 660)+f(2)=660,
$$

Thus,
$$
f(1982)=660.
$$

Note: There exists a function that satisfies the given properties, for example, $f(n)=\left[\frac{n}{3}\right]$.