4. The sequence $\left\{x_{n}\right\}$ satisfies $x_{1}=\frac{1}{2}, x_{k+1}=x_{k}^{2}+x_{k}$. Then the integer part of the sum $\frac{1}{x_{1}+1}+\frac{1}{x_{2}+1}+\cdots+\frac{1}{x_{200 B}+1}$ is $\qquad$
4. 1 .

From the problem, we know that $\left\{x_{n}\right\}$ is an increasing sequence, and $x_{3}>1$. From $\frac{1}{x_{k+1}}=\frac{1}{x_{k}\left(x_{k}+1\right)}=\frac{1}{x_{k}}-\frac{1}{x_{k}+1}$, we get $\frac{1}{x_{k}+1}=\frac{1}{x_{k}}-\frac{1}{x_{k+1}}$.
Then $S=\sum_{k=1}^{2008} \frac{1}{x_{k}+1}=\sum_{k=1}^{2008}\left(\frac{1}{x_{k}}-\frac{1}{x_{k+1}}\right)$ $=\frac{1}{x_{1}}-\frac{1}{x_{2004}}=2-\frac{1}{x_{2004}}$.
Since $x_{2} \cos >x_{3}>1$, then $1<S<2$, so $[S]=1$.