
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
There were 45 sheep and several shepherds in the meadow. After half of the shepherds and one-third of the sheep left, the remaining shepherds and sheep had a total of 126 legs. All sheep and all shepherds had their usual number of legs.

How many shepherds were originally in the meadow?

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