30. You walk a spiraling maze on the Cartesian plane as follows: starting at $(0,0)$ and the first five stops are at $A(1,0), B(1,1), C(0,1), D(-1,1)$ and $E(-1,0)$. Your ninth stop is at the point $(2,-1)$ and so on (see the diagram below). What is the $x$-coordinate of the point which you would arrive at on your 2005 -th stop?
30 Ans: 3 .
Observe that the stop numbers $1,9,25,49, \ldots$ are at the lower right corners. The point $(0,-n)$ is at the stop number $(2 n+1)^{2}-(n+1)=4 n^{2}+3 n$. When $n=22$, we have $4\left(22^{2}\right)+3(22)=2002$. So the point $(0,-22)$ is the 2002 -th stop. Thus the point $(3,-22)$ is the 2005 -th stop.