Evaluation. Three squares at the vertex of a cube form a cycle of adjacent squares of length 3. Around it, another cycle of length 9 is formed from adjacent cells. And around that, a cycle of length 15. Taking three such cycles around two opposite vertices of the cube, and two small cycles around the remaining vertices, we get 18 non-intersecting odd cycles. Since an odd cycle cannot be properly colored with two colors, each of them contains a black cell.

Example. Let's color the four side faces in red and white in a checkerboard pattern. The top and bottom faces will be colored as shown in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_06_0e910282974b56b80e3ag-05.jpg?height=446&width=440&top_left_y=1398&top_left_x=818)

## Answer

18 squares.
Evdokimov M.A.

An abstract artist took a wooden cube $5 \times 5 \times 5$, divided each face into unit squares, and painted each of them in one of three colors - black, white, or red - such that no two adjacent squares (sharing a side) are of the same color. What is the minimum number of black squares that could result? (Squares that share a side are considered adjacent, even if they lie on different faces of the cube.)