A bowl is formed by attaching four regular hexagons of side to a square of side . The edges of the adjacent hexagons coincide, as shown in the figure.

What is the perimeter of the octagon obtained by joining the top eight vertices of the four hexagons, situated on the rim of the bowl?