
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
Three generous friends, each of whom has candies, redistribute them as follows: Vasya gives part of his candies to Petya and Kolya, thereby doubling the number of candies they have. After that, Petya gives part of his candies to Kolya and Vasya, thereby doubling the number of candies they have as well. Finally, Kolya gives part of his candies to Vasya and Petya, whose counts also double. It turned out that Kolya had 36 candies both at the beginning and at the end. How many candies do the boys have in total?

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