9. [ $x$ ] represents the greatest integer not exceeding $x$ (for example, $[3.2]=3$). Given a positive integer $n$ less than 2006, and $\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right]=\frac{n}{2}$. Then the number of such $n$ is $\qquad$.


9.334.

Let $\left[\frac{n}{6}\right]=m$. Then $\frac{n}{6}=m+\alpha(0 \leqslant \alpha<1)$. When $0 \leqslant \alpha<\frac{1}{2}$, we have
$$
\frac{n}{3}=2 m+2 \alpha,\left[\frac{n}{3}\right]=2 m \text {. }
$$

According to $\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right]=\frac{n}{2}$, we get
$$
2 m+m=3 m+3 \alpha \text {. }
$$

Solving for $\alpha$ gives $\alpha=0$.
At this time, $n=6 m<2006(1 \leqslant m \leqslant 334)$.
When $\frac{1}{2} \leqslant \alpha<1$, we have
$$
\frac{n}{3}=2 m+2 \alpha,\left[\frac{n}{3}\right]=2 m+1 \text {. }
$$

From $\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right]=\frac{n}{2}$, we get
$2 m+1+m=3 m+3 \alpha$.
$\alpha=\frac{1}{3}$, which does not satisfy $\frac{1}{2} \leqslant \alpha<1$, so it is discarded.
Therefore, there are 334 such $n$.