
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Let $A_1 A_2 A_3 A_4 A_5 A_6 A_7 A_8$ be a regular octagon.  Let $M_1$, $M_3$, $M_5$, and $M_7$ be the midpoints of sides $\overline{A_1 A_2}$, $\overline{A_3 A_4}$, $\overline{A_5 A_6}$, and $\overline{A_7 A_8}$, respectively.  For $i = 1, 3, 5, 7$, ray $R_i$ is constructed from $M_i$ towards the interior of the octagon such that $R_1 \perp R_3$, $R_3 \perp R_5$, $R_5 \perp R_7$, and $R_7 \perp R_1$.  Pairs of rays $R_1$ and $R_3$, $R_3$ and $R_5$, $R_5$ and $R_7$, and $R_7$ and $R_1$ meet at $B_1$, $B_3$, $B_5$, $B_7$ respectively.  If $B_1 B_3 = A_1 A_2$, then $\cos 2 \angle A_3 M_3 B_1$ can be written in the form $m - \sqrt{n}$, where $m$ and $n$ are positive integers.  Find $m + n$.

Present the answer in LaTex format: \boxed{Your answer}
user