You are given an integer $n$ . On each step, you may subtract from it any one-digit number that appears in it.
How many steps are required to make the number equal to $0$ ?
The only input line has an integer $n$ .
Print one integer: the minimum number of steps.
27
\n
5
\n
An optimal solution is $27 \rightarrow 20 \rightarrow 18 \rightarrow 10 \rightarrow 9 \rightarrow 0$ .