For each integer $n\ge 2$, let $A(n)$ be the area of the region in the coordinate plane defined by the inequalities $1\le x\le n$ and $0\le y\le x\lfloor\sqrt{x}\rfloor$, where $\lfloor\sqrt{x}\rfloor$ is the greatest integer not exceeding $\sqrt{x}$. Find the number of values of $n$ with $2\le n\le 1000$ for which $A(n)$ is an integer.