
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

Five friends, one of whom had a monkey, bought a bag of nuts, which they planned to divide amongst themselves the next morning. However, during the night, one friend woke up and wanted some nuts. He divided all the nuts in the bag into five equal parts, with one nut left over, which he gave to the monkey, and took his fifth part. Following him, another friend woke up; unaware that someone had already taken nuts, he divided the remaining nuts in the bag again into five parts, with one nut left over, which he gave to the monkey, and took his fifth part. Subsequently, the remaining three friends woke up one after another, each performing the same operation: dividing the remaining nuts into five parts, taking their fifth part, with one nut left over each time, which was given to the monkey. Finally, in the morning, all five friends took out the bag, divided the remaining nuts into five parts, and the one nut left over was once again given to the monkey. Determine the smallest number of nuts in the bag such that this division is possible.

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