If there are n people,
the first person will shake hand with n-1 persons,
the second with n-2,
the third with n-3,
the (n-1)th person with n-(n-1)=1 person means the last person.
Hence, total handshakes are (n-1)+(n-2)+(n-3)+….+3+2+1
Which can be equated using n(n-1)/2=66