
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  $a_1,a_2,\ldots,a_n$  be a permutation of the numbers  $1,2,\ldots,n$ , with  $n\geq 2$ . Determine the largest possible value of the sum \[ S(n)=|a_2-a_1|+ |a_3-a_2| + \cdots + |a_n-a_{n-1}| . \]
*Romania*

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