#abc288f. [abc288_f]Integer Division
[abc288_f]Integer Division
Problem Statement
You are given a positive integer with digits in decimal representation. None of the digits of is .
For a subset of , let be defined as follows.
See the decimal representation of as a string of length , and decompose it into strings by splitting it between the -th and -th characters if and only if .
Then, see these strings as integers in decimal representation, and let be the product of these integers.
There are subsets of , including the empty set, which can be . Find the sum of over all these , modulo .
Constraints
- has digits in decimal representation, none of which is .
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
3
234
Sample Output 1
418
For , we have .
For , we have .
For , we have .
For , we have .
Thus, you should print .
Sample Input 2
4
5915
Sample Output 2
17800
Sample Input 3
9
998244353
Sample Output 3
258280134