8. The school organized a picnic, with several people participating. The school prepared many empty plates, and each person who arrived would count the empty plates and then take one to fill with food (each person can only take one empty plate, no more). The first person to arrive would count all the empty plates, the second person to arrive would count one less empty plate than the first person, ..., and so on, until the last person to arrive found there were still 4 empty plates. It is known that the total number of all the empty plates prepared by the school and the total number of people who attended the picnic is 2015, then the total number of people who attended the picnic is $\qquad$.
【Answer】 1006

【Solution】Suppose there are $x$ people who attended the picnic, and there are a total of $2015-x$ empty plates.

The 1st participant counted $2015-x$ empty plates;

The 2nd participant counted $2014-x$ empty plates;

The $n$th participant counted $2016-x-n$ empty plates;

The $x$th participant counted $2016-x-x=2016-2x$ empty plates;

Thus, we get the equation $2016-2x=4 \Rightarrow x=1006$