
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 a string $S$ composed of the characters " $\bigcirc$ " and " $\diamond$ ". Let $\Delta(S)$ represent the difference between the number of " $\diamond$ " and the number of " $\bigcirc$ " in the string $S$ (for example, $\Delta(\diamond \bigcirc \bigcirc \diamond \bigcirc \bigcirc \diamond) = -1$). A string $S$ is called "balanced" if every substring $T$ of $S$ satisfies $-2 \leqslant \Delta(T) \leqslant 2$, where a substring is any sequence of consecutive characters in $S$. Find the number of balanced strings of length $n$.

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