6. Let $x_{k} 、 y_{k} \geqslant 0(k=1,2,3)$. Calculate:
$$
\begin{array}{l}
\sqrt{\left(2018-y_{1}-y_{2}-y_{3}\right)^{2}+x_{3}^{2}}+\sqrt{y_{3}^{2}+x_{2}^{2}}+ \\
\sqrt{y_{2}^{2}+x_{1}^{2}}+\sqrt{y_{1}^{2}+\left(x_{1}+x_{2}+x_{3}\right)^{2}}
\end{array}
$$

the minimum value is