
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 $a_1, a_2, \ldots, a_{50}$ be a sequence of numbers chosen from the three integers -1, 0, 1. If $a_1+a_2+\ldots+a_{50}=9$ and $(a_1+1)^2+(a_2+1)^2+\ldots+(a_{50}+1)^2=107$, determine the number of zeros among $a_1, a_2, \ldots, a_{50}$.

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