eolymp
bolt
Try our new interface for solving problems
Problems

Repeat: how many times to repeat?

Repeat: how many times to repeat?

The positive integer number \textbf{N} 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? \InputFile The number \textbf{N}, \textbf{0} < \textbf{N} ≤ \textbf{2147483647}. \OutputFile The number of performed operations.
Time limit 1 second
Memory limit 64 MiB
Input example #1
21
Output example #1
3
Author Vedensky Cyril aka Vedensky