5. In a certain social event, it was originally planned that each pair of people would shake hands exactly once, but four people each shook hands twice and then left. As a result, there were a total of 60 handshakes during the entire event. Then the number of people who initially participated in the event is $\qquad$ .
5. 15 .

Let the number of people participating in the activity be $n+4$, among which, the number of handshakes among the four people who quit is $x\left(0 \leqslant x \leqslant \mathrm{C}_{4}^{2}=6\right)$.
From the problem, we have $\mathrm{C}_{n}^{2}+4 \times 2=60+x$, which simplifies to $n(n-1)=104+2 x$.
Given $0 \leqslant x \leqslant 6$, and $x$ is an integer, we get $x=3, n=11$.
Therefore, the initial number of people participating in the activity is $n+4=15$.