
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
The common difference of the arithmetic sequence $\left\{ a_n \right\}$ is $d$, and the solution set of the inequality $\frac{d}{2}x^2 + \left( a_1 - \frac{d}{2} \right)x + c \geqslant 0$ with respect to $x$ is $\left[ 0,22 \right]$. Find the maximum value of the positive integer $n$ for which the sum of the first $n$ terms of the sequence $\left\{ a_n \right\}$, denoted as $S_n$, is maximized.

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