Arithmetic Equality

Time limit: 0.35s Memory limit: 256MB Input: Output:

Given an integer nn, find how many numbers of nn digits exist such that the sum of their digits and the product of their digits is equal.

Since the number may be big, print its answer modulo 109+710^9 + 7.

Input

The only line of the input contains one integer, nn (1n1051 \leq n \leq 10^5).

For tests worth 10 points, 1n61 \leq n \leq 6.
For tests worth extra 30 points, 1n1 0001 \leq n \leq 1\ 000.

Output

The only line of the output will contain the required answer.

Example

stdin

2

stdout

1

Log in or sign up to be able to send submissions!