From the Wikipedia on Half-Life follows: $$n\mathrm{,~the~number~of~half~lifes~elapsed}\\\ \mathrm{fraction~remaining} = \frac{1}{2^n}$$
A fraction of 20 grams of the initial 100 grams of isotope is 0.2. Therefore, an answer to the following equation is sought: $$0.2 = \frac{1}{2^n} \\\ {2^n} = \frac{1}{0.2} = 5 \\\ n = {^2}\log{5} = \frac{\log 5}{\log 2}$$ With $n$ being 17 years, the answer to your question is: $$17 \times \frac{\log 5}{\log 2} \approx 39.4727776131 \rightarrow 39 ~\mathrm{years}$$