8. (10 points) In a $5 \times 5$ grid, each number represents the number of solid lines around it. For example, a 0 means no solid lines can be drawn around it. The lines drawn cannot cross or branch, and must form a continuous closed loop in the end. In areas without numbers, there are no restrictions on the number of lines that can be drawn. If each small square in the grid has a side length of 1, then the perimeter of the final closed shape is . $\qquad$
【Answer】Solution: Starting from above the 0 and to the left of the 3, each 3 must have 3 solid edges that are not 0, and then connecting the surrounding numbers can form the required shape as shown in the question. The perimeter of the final shape is 26, so the answer is 26.