3. Let $[x]$ denote the greatest integer not exceeding the real number $x$. Given the sequence $\left\{a_{n}\right\}$ satisfies:
$$
a_{1}=1, a_{n+1}=n+1+a_{n}\left(n \in \mathbf{Z}_{+}\right) .
$$

Then the value of $\left[\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{2018}}\right]$ is ( ).
(A) 1
(B) 2
(C) 3
(D) 2018
3. B.
$$
\begin{array}{l}
a_{n}-a_{1}=\sum_{k=1}^{n-1}\left(a_{k+1}-a_{k}\right)=\sum_{k=1}^{n-1}(k+1) \\
=\frac{n(n+1)}{2}-1 \\
\Rightarrow \frac{1}{a_{n}}=\frac{2}{n(n+1)} .
\end{array}
$$

Therefore, the required value is $\left[2\left(1-\frac{1}{2019}\right)\right]=2$.