Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

G. New Year and Original Order

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputLet *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 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.

Examples

Input

21

Output

195

Input

345342

Output

390548434

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.

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/26/2018 01:04:22 (d3).

Desktop version, switch to mobile version.

User lists

Name |
---|