$\underline{\text { Khamtsov }}$ D:

A cube with side $n$ ( $n \geq 3$ ) is divided by partitions into unit cubes. What is the minimum number of partitions between unit cubes that need to be removed so that from each cube it is possible to reach the boundary of the cube?
Let's show that fewer than $(n-2)^{3}$ removed partitions are insufficient.

Remove all boundary cubes. A remaining cube of $(n-2) \times (n-2) \times (n-2)$ will be divided by partitions into $(n-2)^{3}$ smaller cubes. Now the space is divided by partitions into $(n-2)^{3}+1$ regions, counting the outer one. Removing one partition reduces the number of regions by no more than 1. In the end, the number of regions must become 1, so it is necessary to remove no fewer than $(n-2)^{3}$ partitions.

This amount is sufficient: it is enough to remove the bottom face from each non-boundary cube.

## Answer

$(n-2)^{3}$.