5. Given $x, y \in \mathbf{R}$. Then
$$
\cos (x+y)+2 \cos x+2 \cos y
$$

the minimum value is $\qquad$ $\therefore$.
$$
\begin{array}{l}
\text { 5. }-3 \text {. } \\
\cos (x+y)+2 \cos x+2 \cos y+3 \\
=\left(1+\cos \frac{x+y}{2}\right)^{2}\left(1+\cos \frac{x-y}{2}\right)+ \\
\quad\left(1-\cos \frac{x+y}{2}\right)^{2}\left(1-\cos \frac{x-y}{2}\right) \\
\geqslant 0 .
\end{array}
$$

It is clear that equality can be achieved.
Therefore, the minimum value of the given algebraic expression is -3.