In an $8 \times 8$ grid of squares, each square was colored black or white so that no $2\times 2$ square has all its squares in the same color. A sequence of distinct squares $x_1,\dots, x_m$ is called a snake of length $m$ if for each $1\leq i <m$ the squares $x_i, x_{i+1}$ are adjacent and are of different colors. What is the maximum $m$ for which there must exist a snake of length $m$?