
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 of them had a locker - totaling 1000 lockers, numbered from 1 to 1000. Furthermore, there were exactly 1000 ghosts in this school. Every student locked their locker upon leaving the school, but at night the ghosts would play with the lockers, either unlocking or locking them. One evening, the students left all the lockers locked as usual. Exactly at midnight, the ghosts appeared. First, the first ghost unlocked all the lockers; then, the second ghost locked the lockers whose numbers were divisible by 2; then, the third ghost changed the state (i.e., unlocked it if it was locked and locked it if it was unlocked) of the lockers whose numbers were divisible by 3; the fourth ghost changed the state of the lockers whose numbers were divisible by 4, and so on. After the thousandth ghost changed the state of the thousandth locker, a rooster crowed, and all the ghosts quickly vanished. Can you tell how many lockers remain open after the ghosts' visit?

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