4. The sequence $\left\{x_{n}\right\}$ is defined as follows: $x_{1}=\frac{1}{2}, x_{k+1}=x_{k}^{2}+x_{k}, k=1,2, \cdots$. Find the integer part of the following sum:
$$
\frac{1}{1+x_{1}}+\frac{1}{1+x_{2}}+\cdots+\frac{1}{1+x_{2005}}
$$
4. First, it is evident that the sequence $\left\{x_{n}\right\}$ is strictly monotonically increasing, and $x_{k+1}=x_{k}\left(x_{k}+1\right)$, i.e., $\frac{1}{x_{k}+1}=\frac{1}{x_{k}}-\frac{1}{x_{k+1}}, \frac{1}{1+x_{1}}+$ $\frac{1}{1+x_{2}}+\cdots+\frac{1}{1+x_{2005}}=\frac{1}{x_{1}}-\frac{1}{x_{2006}}=2-\frac{1}{x_{2006}}$, and $x_{2}=\frac{3}{4}, x_{3}=\frac{21}{16}>1, x_{2006}>1$, so the integer part of the desired sum is 1.