6. The sequence $\left\{x_{n}\right\}$ satisfies $x_{1}=\frac{1}{2}, x_{n+1}=x_{n}^{2}+x_{n}$. Let $[x]$ denote the greatest integer not exceeding $x$, then $\left[\frac{1}{1+x_{1}}+\frac{1}{1+x_{2}}+\cdots+\frac{1}{1+x_{2009}}\right]$ is $\qquad$ .