#### Answer

$2000$.

#### Work Step by Step

From the given information, we can observe that we have an infinite geometric series having initial population $a$:
$a,0.9\left( a \right),{{0.9}^{2}}\left( a \right),{{0.9}^{3}}\left( a \right),\cdots $
Here, $a$ is the initial population of flies.
Here ${{a}_{1}}=a$ and the common ratio $r=0.9$.
We use the formula for the sum of a geometric series with infinite terms
${{S}_{n}}=\frac{{{a}_{1}}}{\left( 1-r \right)}$.
Thus
$\begin{align}
& 20000=\frac{a}{\left( 1-0\cdot 9 \right)} \\
& \ \ \ \ \ \ \ a=20000\times 0\cdot 1 \\
& \ \ \ \ \ \ \ a=2000 \\
\end{align}$