
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 any positive integer \( n \) can be uniquely represented as
\[ 
n = a_{0} + a_{1} \cdot 9 + a_{2} \cdot 9^{2} + \cdots + a_{m} \cdot 9^{m} 
\]
where \( m \) is a non-negative integer, \( a_{j} \in \{0, 1, \cdots, 8\} \) for \( j = 0, 1, \cdots, m-1 \), and \( a_{m} \in \{1, \cdots, 8\} \), find the sum of all positive integers \( n \) for which the sequence \( a_{0}, a_{1}, a_{2}, \cdots, a_{m} \) is either strictly monotonically increasing or strictly monotonically decreasing.


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