5. In the sequence $\left\{a_{n}\right\}$, $a_{1}=2, a_{n}+a_{n+1}=1\left(n \in \mathbf{N}_{+}\right)$, let $S_{n}$ be the sum of the first $n$ terms of the sequence $a_{n}$, then the value of $S_{2017}-$ $2 S_{2018}+S_{2019}$ is $\qquad$
$$
\begin{array}{l}
a_{1}=2, a_{2}=-1, a_{3}=2, a_{4}=-1, \cdots, \text { so } S_{2017}-2 S_{2018}+S_{2019} \\
=-\left(S_{2018}-S_{2017}\right)+\left(S_{2019}-S_{2018}\right)=-a_{2018}+a_{2019}=3 .
\end{array}
$$