
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
At a club, twenty gentlemen met. Some of them were wearing hats, and some were without hats. From time to time, one of the gentlemen took off his hat and put it on one of those who did not have a hat at that moment. In the end, ten gentlemen counted that each of them had given away a hat more times than they had received one. How many gentlemen came to the club wearing hats?

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