$\underline{\text { Folklore }}$

On a chessboard, $n$ white and $n$ black rooks are placed such that rooks of different colors do not attack each other. Find the maximum possible value of $n$.

#
Let's prove that for $n>16$, the specified arrangement is impossible. Note that on each row and each column, rooks can only be of one color (or the row/column can be free of rooks). We will denote a row (column) by the same color as the rooks standing on it.

Since there are more than 16 rooks, there are at least three white rows.

If there are exactly three white rows, then one of them must contain at least six rooks, meaning there are at least six white columns and no more than two black columns. As shown above, this is impossible.

Therefore, there are at least four white rows, which means there are no more than four black rows. The same applies to black columns. Thus, there are no more than 16 black rooks. Contradiction.

An example of a possible arrangement for $n=16$ is shown in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_06_7181633d50815d79481eg-12.jpg?height=423&width=504&top_left_y=1712&top_left_x=777)

## Answer

16.