
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—Masha, Nastya, Irina, Olya, and Anya—gather every day in the park after buying ice cream from the shop around the corner. One day, they had a conversation.

Irina: I was the first in line!

Olya: There was no one after me.

Anya: Only one person was after me.

Masha: There were five people ahead of me.

Nastya: I was standing next to Irina.

The girls are friends and do not lie to each other. How many people were between Masha and Nastya?

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