 Geometry on graph paper

In each cell of a chessboard, there are two cockroaches. At a certain moment, each cockroach crawls to an adjacent (by side) cell, and the cockroaches that were in the same cell crawl to different cells. What is the maximum number of cells on the board that can remain free after this?
Evaluation. We will color 20 cells of the board as shown in the left figure. Each colored cell has the following property: no matter which two adjacent cells the cockroaches crawl into from it, the cockroaches will not be able to reach these cells from any other colored cell. Therefore, after all the cockroaches have moved, at least 40 cells of the board will be occupied.
![](https://cdn.mathpix.com/cropped/2024_05_06_98b9f094130a137f64e2g-36.jpg?height=234&width=594&top_left_y=1058&top_left_x=730)

Example. Suppose all the cockroaches crawl into the cells shaded as shown in the right figure. Since each unshaded cell borders exactly two shaded cells, this is possible. In this case, 24 cells will remain free.

## Answer

24 cells.