2. Given a positive integer $n$ less than 2006, and
$$
\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right]=\frac{n}{2} \text {. }
$$

Then the number of such $n$ is $\qquad$.
From $\left[\frac{n}{3}\right]+\left[\frac{n}{6}\right] \leqslant \frac{n}{3}+\frac{n}{6}=\frac{n}{2}$, knowing that equality holds, $n$ is a common multiple of $3$ and $6$, i.e., a multiple of $6$. Therefore, the number of such $n$ is $\left[\frac{2006}{6}\right]=334$.