6, 3. Find how many integer solutions the equation has

$$
\left|5-x_{1}-x_{2}\right|+\left|5+x_{1}-x_{2}\right|+\left|5+x_{2}+x_{3}\right|+\left|5+x_{2}-x_{3}\right|=20
$$
Solution. We can rewrite the equation in the form

$$
\left|y_{1}\right|+\left|y_{2}-y_{1}\right|+\left|y_{3}-y_{2}\right|+\left|20-y_{3}\right|=20
$$

where $y_{1}=5-x_{1}-x_{2}, y_{2}=10-2 x_{2}$ and $y_{3}=15-x_{2}+x_{3}$, so every integer solution of the original equation gives an integer solution of (??) with $y_{2}$ an even number. Conversely, it is straightforward to check that every solution of (??) with $y_{2}$ even gives a solution to the equation in the statement. We observe that (??) can be written as

$$
d\left(0, y_{1}\right)+d\left(y_{1}, y_{2}\right)+d\left(y_{2}, y_{3}\right)+d\left(y_{3}, 20\right)=d(0,20)
$$

where $d(x, y)=|x-y|$ is the distance between the real numbers $x$ and $y$. This situation can only occur if $0 \leq y_{1} \leq y_{2} \leq y_{3} \leq 20$ (we can imagine a carpenter's rule with four segments whose lengths sum to 20 units and which must cover from 0 to 20, which is a distance of 20 units. The only possibility is that the rule is fully stretched). It is then a matter of counting the triples of integers $0 \leq y_{1} \leq y_{2} \leq y_{3} \leq$ 20 with $y_{2}$ even. If we write $y_{2}=2 k$ with $0 \leq k \leq 10$, there are $2 k+1$ possibilities for $y_{1}$ and $21-2 k$ for $y_{3}$, so the number of solutions sought is

$$
\sum_{k=0}^{10}(2 k+1)(21-2 k)=\sum_{k=0}^{10}\left(21+40 k-4 k^{2}\right)=21 \times 11+40 \times 55-4 \times 385=891
$$

Therefore, the number of integer solutions of the given equation is 891.