for example Example
4 people = 6 handshakes
This is because Person A handshakes B, C, and D. now everyone has handshaked
Person A. So now its just three people. B shakes C and D and now everyone has
shaked him. Now C shakes D and that's it. The answer is six.
You might notice that the number of handshakes decreases per people. For four,
it starts of with three, than two, than one. So 4 people = 3 + 2 + 1 = 6.