Compute the number of positive integers n between 2017 and 2017^2 such that n^n \equiv 1 (\bmod ~2017) .(2017 is prime.)