P14337 [JOI2020 Preliminaries R2] Digit Sum

Description

Mr. JOI initially holds an integer greater than or equal to $ 1 $ and less than or equal to $ N $. After Mr. JOI performs the following operation several times (not less than 0 times), the integer he holds becomes $ N $: - Write the integer he currently holds in decimal, and add the sum of its digits to that integer. Given $ N $, write a program to find the number of integers Mr. JOI could have initially held.

Input Format

The input is given from standard input in the following format: $ N $

Output Format

Output one line, the number of integers Mr. JOI could have initially held.

Explanation/Hint

### Sample 1 Explanation For example, if Mr. JOI initially holds the integer $ 5 $ and performs the operation 3 times, the value changes as $ 5 \to 10 \to 11 \to 13 $. Therefore, the integers Mr. JOI could have initially held are only these 4 values: $ 5 $, $ 10 $, $ 11 $ and $ 13 $. ### Constraints - $ 1 \le N \le 1\,000\,000 $. - $ N $ is an integer. Translated by QwenWork