
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 the real numbers \( a_1, a_2, \cdots, a_{40} \) satisfy
\[ a_1 + a_2 + \cdots + a_{40} = 0 \]

and for \( 1 \leqslant i \leqslant 40 \), we have
\[ \left|a_i - a_{i+1}\right| \leqslant 1 \quad (\text{with } a_{41} = a_1). \]

Let \( a = a_{10}, b = a_{20}, c = a_{30}, d = a_{40} \).
Find:
1. The maximum value of \( a + b + c + d \).
2. The maximum value of \( ab + cd \).

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