There is an infinite grid and an m* n rectangle of stones on it (1 <= m,n <= 1000). The stones are located in the knots of the grid.
A following game for a single player is being played. One stone can jump over another along a vertical or a horizontal line. A stone which had been overjumped is taken away. The purpose of the game is to minimize number of stones on a grid.
若m=1 => a= (m+1)/2 的整数部分
若m或n为3的倍数 => a=2
其他情况 => a=1