Coins are placed in some squares on a $n\times n$ board. Each coin can be moved towards the square symmetrical with respect to either of the two diagonals, as long as that square is empty. The initial coin setup is said to be good , if any coin can make the first move. (a) Determine the maximum number of coins $M$ that can be placed on the $n\times n$ board, such that the configuration is good. (b) Calculate the total number of good configurations that have exactly $M$ coins.