5. (5 points) A rectangular prism with a length of 6 cm, a width of 5 cm, and a height of 4 cm is painted red on all its surfaces, and then the prism is cut into small cubes with an edge length of 1 cm. The number of small cubes that have no faces painted is $\qquad$.

【Analysis】According to the characteristics of cutting and assembling a rectangular prism into a cube: the small cubes with no red paint on their surfaces are all inside this rectangular prism, so the volume of these unpainted small cubes with an edge length of 1 cm is: $(\text{length} - 2) \times (\text{width} - 2) \times (\text{height} - 2)$. Therefore, substituting the data can solve the problem.

【Solution】Solution: $(6-2) \times (5-2) \times (4-2) \div (1 \times 1 \times 1)$,
$$
\begin{array}{l}
=4 \times 3 \times 2 \div 1, \\
=24 \text{ (cubes), }
\end{array}
$$

Answer: The number of small cubes with no paint on any face is 24.
Therefore, the answer is: 24.