5. A row of dice. (6 - $\mathbf{1 1}$ grades, $\mathbf{1}$ point). 2012 fair dice (cubes) are arranged in a row such that each pair of adjacent dice touch each other with the same faces (domino principle). Otherwise, the position of the dice is random. Find the sum of the points that ended up on the surface of the resulting figure.
Solution. The sum of the points on a die is $1+2+3+4+5+6=21$. The total points on all dice is $2012 \cdot 21$. For a fair die, the sum of the points on opposite faces is 7. Let the number of points on the end face of the first die be $X$ - this is a random variable taking natural values from 1 to 6. Then the number of points on the end face of the last die is also $X$. Therefore, the sum of the points on the adjacent faces is $2012 \cdot 7 - 2X$.

Subtracting this sum from the total number of points, we get:

$$
2012 \cdot (21-7) + 2X = 28168 + 2X \text{.}
$$

Answer: 28170, 28172, 28174, 28176, 28178, or 28180.