Apply the formula:
n(n+1)/2
Where n is the number of shake hands of the first person (9)
9 (9+1) /2
9 (10)/2
90/2
45 shakes
1.6m questions
2.0m answers