Effectiveness of Permutations#3656

Effectiveness of Permutations

1 second
64 megabytes
Easy

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 .

Input

A single line containing the sequence of numbers, separated by spaces.

Output

A single line containing the answer to the problem.

Examples

Example 1

Loading
Loading