Question
Special Numbers less than N
You are given an integer N. Find the number of integers less than equal to N that are special.
A number x is said to be special if F(x+1) < F(x), where F(x)= the sum of digits of x. For example F(14)=5, F(7)=7.
Input
The first line contains a single integer N.

Constraints
1 ≤ N ≤ 109
Output
Print the number of special integers less than equal to N.
Example
Sample Input:
9
Sample Output:
1

Sample Input:
5
Sample Output:
0

Online