
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 \( S_n \) is the sum of the first \( n \) terms of an arithmetic sequence \( \{a_n\} \), it is known that \( S_9 = 18 \) and \( a_{n-4} = 30 \) for \( n > 9 \), and \( S_n = 336 \). Find the value of \( n \).

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