PUMaC 2016 Team Problem 15

Compute the sum of all positive integers n with the property that x^{n} \equiv 1(\bmod ~2016) has n solutions in \{0,1,2, \ldots, 2015\}.