
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
Petya and Masha take turns taking candy from a box. Masha took one candy, then Petya took 2 candies, Masha took 3 candies, Petya took 4 candies, and so on. When the number of candies in the box became insufficient for the next turn, all the remaining candies went to the person whose turn it was to take candies. How many candies did Petya receive if Masha got 101 candies?

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