
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
In a small Scottish town, there was a school with exactly 1000 students. Each student had a locker, making a total of 1000 lockers numbered from 1 to 1000. Additionally, the school was home to 1000 ghosts. Every student would lock their locker before leaving school, but at night, the ghosts would play with the lockers, opening and closing them. One evening, the students left all the lockers locked as usual. At midnight, the ghosts appeared. The first ghost opened all the lockers; the second ghost closed every locker numbered with a multiple of 2; the third ghost toggled the state (opened if closed, closed if opened) of every locker numbered with a multiple of 3; the fourth ghost toggled every locker numbered with a multiple of 4, and so on. After the 1000th ghost had toggled the 1000th locker, the ghosts vanished when the rooster crowed. How many lockers remained open after the ghosts’ visit?

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