You are in a classroom with 40 people of varying heights. The teacher/instructor of the room has asked you to exchange papers for the purpose of marking them. However, nobody is allowed to change papers with anyone that is shorter than themself.
How many exchanges will occur? Please explain how you arrived at your answer.