
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 class of 40 students all standing in a line facing forward, they take turns counting off in a sequence of 1, 2, 3, 4, repeating the pattern. Every student calls out one number. Students who call out 3 turn around to face backward. After this, if any two adjacent students are facing each other, they shake hands and then both turn around to face backward. This process continues until no students are facing each other. How many handshakes occur in total during the entire process?

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