
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 \( S(m) \) denote the sum of the digits of the positive integer \( m \). Among the positive integers \( 1, 2, \ldots, 2017 \), find the minimum value of \( n \) for which we can always select \( n \) different numbers such that among these \( n \) numbers, there exist eight different numbers \( a_1, a_2, \ldots, a_8 \) such that \( S(a_1) = S(a_2) = \cdots = S(a_8) \).

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