5. The figure "archer" on a grid board attacks along a ray - along cells upwards, downwards, to the right, or to the left (exactly one of the four directions; the directions for different archers are independent). What is the maximum number of non-attacking archers that can be placed on an $8 \times 8$ chessboard?
Solution. Answer: 28. We will prove that it is impossible to place more than 28 archers. Consider any arrangement with the maximum possible number of archers. Perform the following two operations sequentially:

1) turn those archers who are standing at the edge of the board so that they shoot "outward" (this will not "worsen" the situation, that is, no archers will start shooting at each other if they were not shooting at each other before);
2) move the archers who are not standing at the edge of the board in the direction of their shooting to the edge of the board. As a result, there will be no more than one archer in each boundary cell of the board. Moreover, no two archers will shoot at each other (since those who were standing at the edge, we turned "outward"). Therefore, the total number of archers will not exceed the number of boundary cells, that is, no more than 28.

Example with 28 archers: on the bottom row, 8 archers shoot downward; on the top row, 8 archers shoot upward; in the leftmost column on the 2nd to 7th rows, 6 archers shoot to the left; in the rightmost column on the 2nd to 7th rows, 6 archers shoot to the right.

Note: A solution based solely on "moving archers in the direction of their shooting to the edge of the table" cannot be considered fully correct. After all, with such an operation, two archers can claim the same boundary cell of the board!