
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
A student walks down a hallway that contains a row of closed lockers, numbered from $0$ to $511$. Initially, she opens the locker numbered $0$, and then alternates between skipping and opening each locker. When she reaches the end of the hall, the student turns around and starts back. She opens the first closed locker she encounters, and then alternates between skipping and opening each closed locker thereafter. The student repeats this back-and-forth pattern until every locker is open. What is the number of the last locker she opens?

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