Given a sequence of non-negative integers, determine how many distinct sequences can be formed by permuting the sequence of their decimal digits, including the original sequence. Provide the result modulo .
The total number of digits will not exceed .
A single line containing the sequence of numbers, separated by spaces.
A single line containing the answer to the problem.
Example 1