From 24 matches, a figure has been formed in the shape of a square (see the figure), with the side length of each small square equal to the length of a matchstick. What is the minimum number of matchsticks that can be removed so that no whole square formed by the matchsticks remains?