I believe you should make the first person write down a obscure number like 3423, and the next person add his / her salary, to the number, and each person adds his/her salary until it reaches the first person who wrote down the obscure number. He adds his salary, subtracts the number he wrote and then divides the final number by the total number of people.