题目描述
Problem Statement
Ada the Ladybug has just returned from her trips. She noted all her expenses. Sadly, she only had a small piece of paper so she had to keep it in a compressed form. The compressed form is just a very long number. To restore the expenses, simply sum all contigous subsequences of the number. Since this number might be pretty big, you only have to output it modulo 10 $ ^{9} $ +7 (1000000007).
Can you help her to restore the number?
Input Format
The first and the only line of input containts the compressed sequence of digits (\[0..9\]): 1
Output Format
Print the sum of all contigous subsequences
Sample Input and Output
Sample Input #1
123
Sample Output #1
164
Sample Input #2
001
Sample Output #2
3
Sample Input #3
105004400
Sample Output #3
127807548
Sample Input #4
4774
Sample Output #4
6245
Sample Input #5
4369383968
Sample Output #5
353343059
Sample Input #6
447723168365033648256648424988
Sample Output #6
42233771
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
123
样例输出
164