3. (8 points) As shown in the figure, a square is constructed from the side of an equilateral triangle, then a regular pentagon is constructed using a side of the square that is not adjacent to the equilateral triangle, then a regular hexagon is constructed from a side of the pentagon that is not adjacent to the square, and then a regular heptagon is constructed in the same way, followed by a regular octagon, thus forming a polygon. How many sides does this polygon have? $\qquad$
【Solution】Solution: $(3-1)+(4-2)+(5-2)+(6-2)+(7-2)+(8-1)$
$$
\begin{array}{l}
=2+2+3+4+5+7 \\
=23 \text { (sides) }
\end{array}
$$

Answer: This polygon has 23 sides.
Therefore, the answer is: 23.