Arithmetic progression with a tolerance of 1.
We set the maximum term as x, that is, the number of times the first person shakes hands with others is x.
According to arithmetic progression's summation formula
(x+ 1)*x/2=2 1
The solution is x=6.
So there are 6+ 1=7 people.
That is 6+5+4+3+2+ 1=2 1 handshake.