
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 $0 \leq a_k \leq 1$ for $k=1,2,\ldots,2020$, and defining $a_{2021}=a_1, a_{2022}=a_2$, find the maximum value of $\sum_{k=1}^{2020}\left(a_{k}-a_{k+1} a_{k+2}\right)$.

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