Suppose Tommy walks from his home at (0, 0) to the mall at (0, 9), and then walks to a movie theater at (8, 9). After leaving the theater Tommy walks to the store at (8, 0) before returning home. If each grid square represents one block, how many blocks does he walk?