Determine the number of integers xxx in the range 1≤x≤5001 \le x \le 5001≤x≤500 such that x2≡x(mod500)x^2 \equiv x \pmod{500}x2≡x(mod500).
444
888
161616
323232