In the picture, there is a structure made of identical cubes. It is a cube with several holes through which you can see through, and these holes have the same cross-section everywhere. How many cubes is the structure made of?

(M. Krejčová)

![](https://cdn.mathpix.com/cropped/2024_04_17_0d982c5cbb35b07eed65g-5.jpg?height=497&width=512&top_left_y=505&top_left_x=772)

Idea. Try counting by layers.
We will divide the building with four horizontal cuts into five layers. The middle layer is shown in the left image, consisting of 16 blocks. The other four layers all look like the image on the right, and each consists of 24 blocks. The total number of blocks used for the entire building is $16 + 4 \cdot 24 = 112$.
![](https://cdn.mathpix.com/cropped/2024_04_17_0d982c5cbb35b07eed65g-5.jpg?height=210&width=1078&top_left_y=1408&top_left_x=494)

Another idea. How many blocks are missing in the tunnels?

Another solution. Imagine that the building was originally constructed without "tunnels" and they were only created later. Thus, it originally consisted of $5 \cdot 5 \cdot 5 = 125$ blocks. The first tunnel removed 5 blocks, and the other two tunnels each removed 4 blocks. The final number of blocks is therefore $125 - 5 - 4 - 4 = 112$.