3. For any positive integer $n$, connect the origin $O$ with the point $A_{n}(n, n+3)$, and let $f(n)$ denote the number of all integer points on the line segment $O A_{n}$ except for the endpoints. Then the value of $f(1)+f(2)+f(3)+\cdots+f(2002)$ is ( ).
(A) 2002
(B) 2001
(C) 1334
(D) 667
3. (C).

The integer points $(x, y)$ on the line segment $O A_{n}$ satisfy $1=\frac{n+3}{n} \cdot x(0<x<n$, and $x \in \mathbf{N})$. When $n=3 k(k \in \mathbf{N})$,
$$
y=\frac{k+1}{k} \cdot x(0<x<3 k, x \in \mathbf{N}) .
$$
$\because k$ and $k+1$ are coprime,
$\therefore$ only when $x=k$ or $2 k$, $y \in \mathbf{N}$. Thus, $f(3 k)=2$.
When $n=3 k+1(k \in \mathbf{N})$,
$$
y=\frac{3 k+4}{3 k+1} \cdot x(0<x<3 k+1, x \in \mathbf{N}) \text {. }
$$
$\because 3 k+4$ and $3 k+1$ are coprime,
$$
\therefore f(3 k+1)=0 \text {. }
$$

When $n=3 k-1(k \in \mathbf{N})$, similarly, $f(3 k-1)=0$.
Therefore, $f(1)+f(2)+f(3)+\cdots+f(2002)$
$$
=2\left[\frac{2002}{3}\right]=1334 .
$$