
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 \(n\) be a positive integer. Alice writes \(n\) real numbers \(a_{1}, a_{2}, \ldots, a_{n}\) in a line (in that order). Every move, she picks one number and replaces it with the average of itself and its neighbors \(\left(a_{n}\) is not a neighbor of \(a_{1}\), nor vice versa\). A number changes sign if it changes from being nonnegative to negative or vice versa. In terms of \(n\), determine the maximum number of times that \(a_{1}\) can change sign, across all possible values of \(a_{1}, a_{2}, \ldots, a_{n}\) and all possible sequences of moves Alice may make.

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