Upgrade subject to access all content

Each square has side length 1. The squares have the same center and are rotated $45^{\circ}$ from each other. How long is each side of the regular octagon which is formed?

$\cfrac{1}{3}$

$\cfrac{1}{2}$

$\cfrac{1}{\sqrt{2}}$

$\cfrac{1}{2+\sqrt{2}}$

$\cfrac{\sqrt{2}}{2+\sqrt{2}}$