How many times to repeat?#395

How many times to repeat?

2 seconds
128 megabytes
Easy (≈1000)

The positive integer is given. We subtract from this number the sum of its digits. From the received number we soon subtract the sum of its digits and so on. This operation continues until the number is positive. How many times this operation will be repeated?

Input

One number (0 < n < 2 \cdot 10^9).

Output

The amount of performed operations.

Examples

Example 1

Loading
Loading