
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 that the positive integers \(a_{1}, a_{2}, \cdots, a_{31}, b_{1}, b_{2}, \cdots, b_{31}\) satisfy the following conditions:
1. \(a_{1} < a_{2} < \cdots < a_{31} \leqslant 2015\) and \(b_{1} < b_{2} < \cdots < b_{31} \leqslant 2015\)
2. \(a_{1} + a_{2} + \cdots + a_{31} = b_{1} + b_{2} + \cdots + b_{31}\)

Find the maximum value of 
\[ S = \left|a_{1} - b_{1}\right| + \left|a_{2} - b_{2}\right| + \cdots + \left|a_{31} - b_{31}\right|. \]

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