
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
A sequence of numbers \(a_1, a_2, \cdots, a_n, \cdots\) is defined. Let \(S(a_i)\) be the sum of all the digits of \(a_i\). For example, \(S(22) = 2 + 2 = 4\). If \(a_1 = 2017\), \(a_2 = 22\), and \(a_n = S(a_{n-1}) + S(a_{n-2})\), what is the value of \(a_{2017}\)?

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