A set $S$ is constructed as follows. To begin, $S=\{0,10\}$. Repeatedly, as long as possible, if $x$ is an integer root of some polynomial $a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$ for some $n\ge1$, all of whose coefficients $a_i$ are elements of $S$, then $x$ is put into $S$. When no more elements can be added to $S$, how many elements does $S$ have?