
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
Given positive integers $m$ and $n$, consider an $m \times n$ chessboard where the $mn$ unit squares are alternately colored red and blue (any two squares with a common edge have different colors, and the bottom-left square is red). The diagonal line from the bottom-left to the top-right is colored into some red and blue segments (each segment is the same color as the square it is in). Calculate the sum of the lengths of all red segments on this diagonal line.

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