
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
Solve the problem: Octopuses with an even number of legs always lie, while octopuses with an odd number always tell the truth. Five octopuses met, each having between 7 to 9 legs.

The first said, "Together we have 36 legs";
The second said, "Together we have 37 legs";
The third said, "Together we have 38 legs";
The fourth said, "Together we have 39 legs";
The fifth said, "Together we have 40 legs".

How many legs did they actually have?

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