题目描述
For a positive integer n, let us define f(n) as the number of digits in base 10.
You are given an integer S.
Count the number of the pairs of positive integers $(l, r) (l \leq r)$ such that f(l) + f(l + 1) + ... + f(r) = S, and find the count modulo 10^9 + 7.
-----Constraints-----
- $1 \leq S \leq 10^8$
-----Input-----
Input is given from Standard Input in the following format:
S
-----Output-----
Print the answer.
-----Sample Input-----
1
-----Sample Output-----
9
There are nine pairs (l, r) that satisfies the condition: (1, 1), (2, 2), ..., (9, 9).
输入格式
见题面
输出格式
见题面
样例输入
1
样例输出
9