- Time limit: 1.00 s
- Memory limit: 512 MB
You are given an integer . On each step, you may subtract one of the digits from the number.
How many steps are required to make the number equal to ?
Input
The only input line has an integer .
Output
Print one integer: the minimum number of steps.
Constraints
Example
Input:
27
Output:
5
Explanation: An optimal solution is .