I was working on a computer program and came up with an intuitive idea that reduces the program module by a considerable length. The idea is intuitive but I never came up with a proof.
Claim: For a natural number $ n $, let $ S ( n ) $ denote the sum of digits of $ n $ in its decimal expansion. Prove that there exists a natural number $ k $, such that $$ \underbrace { S \bigg( S \Big( S \big( \dots S } _ { k \text { times} } ( n ) \big) \dots \Big) \bigg) $$ is a single digit number.
Any help with this proof will be appreciable.