A stone is placed in a square of a chessboard with rows and columns. We can alternately undertake two operations: (a) move the stone to a square that shares a common side with the square in which it stands;(b) move it to a square sharing only one common vertex with the square in which it stands.
In addition, we are required that the first step must be (b). Find all integers such that the stone can go through a certain path visiting every square exactly once.