
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
Find the set of unique nonnegative integers $n_1, n_2, \ldots, n_r$ and $r$ unique integers $a_k$ ($1\leq k\leq r$) with each $a_k$ either $1$ or $-1$ such that \[a_1 3^{n_1} + a_2 3^{n_2} + \cdots + a_r 3^{n_r} = 2021.\] Compute the sum $n_1 + n_2 + \cdots + n_r$.

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