A. A simple problem
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

We have learned your team is good at counting problems. So we ask you a simple problem.

Now you have $$$0-n$$$ permutation, and you need to connect all the numbers in each permutation to make a new valid number and we define the new valid number as $$$S$$$. It is worth noting that if a certain permutation contains leading zero, the permutaion should be eliminated.

For example if $$$n = 2$$$, the set of $$$S$$$ will be $$$102, 120,201,210$$$.

Your task is to count how many $$$S$$$(without leading $$$0$$$) are divisible by $$$m$$$.

Input

There is a single case.

The first line contains two integers $$$n$$$, $$$m$$$$$$(1 \leq n \leq 15, 1 \leq m \leq 100)$$$.

Output

Print a single integer in one line: the number of how many $$$S$$$ are divisible by $$$m$$$.

Example
Input
2 3
Output
4