On each wall of a regular octahedron, one of the numbers $1,2,3,4,5,6,7$ and 8 is written, with different numbers on different walls. For each wall, Jarda determined the sum of the number written on it and the numbers of the three adjacent walls. Thus, he obtained eight sums, which he also added together.

What values can this final sum take?

(J. Zhouf)

Hint. How many times is each number counted in the total sum?
The number on each face is counted in a total of four partial sums (each face is counted once as a middle and three times as an adjacent). Therefore, each of the numbers is also counted four times in the final sum. The resulting sum thus has the value

$$
4 \cdot(1+2+3+4+5+6+7+8)=4 \cdot 36=144
$$

and this is independent of how the numbers were written on the faces of the octahedron.