题目描述
Special Numbers
Mani has encountered a problem on Special numbers in Bytecode. A number S is called a special number if its digits are in an arithmetic progression modulo 10. He has an array consisting of all numbers from 1 to N and needs your help to find the number of special numbers in the array. He has promised you a significant share of the prize money if he wins the contest :p
Note:
123,99,802 are special numbers.
146 is not a special number
-----Input-----
Input consists of 1 integer - the value of N
-----Output-----
Print one integer in the first line - the solution to this problem
-----Constraints-----
- 1 ≤ Number of digits in N ≤ 105
Example
Input
123
Output
102
输入格式
见题面
输出格式
见题面
样例输入
['123']
样例输出
['102']