Good Bye 2017
G
New Year and Original Order
Codeforces
2800
原题
← FH →
翻译中…

Let $*S*(*n*)$ denote the number that represents the digits of $*n*$ in sorted order. For example, $*S*(1) = 1, *S*(5) = 5, *S*(50394) = 3459, *S*(353535) = 333555$.

翻译中…

Given a number $*X*$, compute image modulo $10^{9} + 7$.

翻译中…

Input

翻译中…

The first line of input will contain the integer $*X*$ ($1 ≤ *X* ≤ 10^{700}$).

翻译中…

Output

翻译中…

Print a single integer, the answer to the question.

翻译中…

Note

翻译中…

The first few values of $*S*$ are $1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 12$. The sum of these values is $195$.

翻译中…

样例

Input #1
21
Output #1
195
InputCopy OutputCopy
Input #2
345342
Output #2
390548434
InputCopy OutputCopy
题目信息
题号
908G
所属比赛
时间限制
2 s
内存限制
256 MB
标签
动态规划
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。