[tex]S=9+99+999+...+ \underbrace{99...9}_{\mbox {2013}}}= \\ \\ =(10-1)+(100-1)+(1000-1)+...+(1 \underbrace{00...0}_{\mbox{2013}}-1)= \\ \\ =(10+100+1000+...+100...0)-( \underbrace{1+1+...+1}_{\mbox{2013}})= \\ \\ =\underbrace{111...1}_{\mbox{2013}}0-2013= \\ \\ =\underbrace{111...1}_{\mbox{2009}}09097.[/tex]