A regular octagon has sides that each measure 2 units long.
A square is inscribed inside, where the vertices of the square touch the regular octagon at midpoints, as shown.
What is the area of the shaded red portion?