[tex]S=40+20+10+\cdots+0.078125[/tex]
[tex]S=40\left(1+\dfrac12+\dfrac14+\cdots+\dfrac1{512}\right)[/tex]
[tex]S=40\left(1+2^{-1}+2^{-2}+\cdots+2^{-9}\right)[/tex]
[tex]2^{-1}S=40\left(2^{-1}+2^{-2}+2^{-3}+\cdots+2^{-10}\right)[/tex]
[tex]\implies S-2^{-1}S=40\left(1-2^{-10}\right)[/tex]
[tex]\implies\dfrac12S=40\left(1-\dfrac1{1024}\right)[/tex]
[tex]\implies S=80\left(1-\dfrac1{1024}\right)=\dfrac{5115}{64}=79.921875[/tex]