SP5703 LPRIME - Primes of Lambda
Description
[Lambda](../../../users/tonyxty/) checks primality in a weird way. He checks the following two conditions.
- All the digits of the number in the decimal system are primes or one, namely 1, 2, 3, 5 or 7.
- It isn't a multiple of 2, 3, 5, 7, 11 or 47 (Why 47? I don't know).
In order to estimate the accuracy of his approach, he asks you to calculate the number of decimal integers of a specific length that satisfy the conditions.
Input Format
The first and only line contains an integer _n_, denoting the length of integers.
Output Format
The only line contains the answer **modulo 9973**.