How many times to repeat?#20

How many times to repeat?

2 seconds
128 megabytes
Easy

A positive integer is given. Perform the following operation: subtract the sum of the digits of from . Repeat this operation with the new result as long as the number remains positive. Determine how many times this operation can be performed before the result becomes zero or negative.

Input

A single integer (0 < n \leq 2 \cdot 10^9).

Output

Print the number of times the operation is performed.

Examples

Example 1

Loading
Loading