How many prefix ones?#730

How many prefix ones?

1 second
256 megabytes
Very easy

In the 1920s, the Polish mathematician Jan Lukasiewicz introduced the bracket-free notation for algebraic expressions, known as Polish notation. In prefix (Polish) notation, the operator is placed before its operands. For example, if the infix expression is (b-c/d)/(e*f-(g+h*k)), the prefix form of the segment is , and for b-c/d it is . The segment e*f is , h*k is , and g+h*k is +g*hk. Thus, the expression e*f-(g+h*k) becomes -*ef+g*hk in prefix notation, and combining all together for the final division operation, the full prefix expression is /-b/cd-*ef+g*hk.

Given an integer (1 \leq N \leq 50), determine the number equal to the total number of possible prefix expressions of length using only the binary operations '+', '-', '*', '/', as well as the required number of unique letters—either the first letters of the Old Georgian alphabet, the last letters of the modern Ukrainian alphabet, or a combination of both with no repetitions. The result should be computed modulo , assuming all possible prefix expressions satisfying the above are ordered in descending order according to the value obtained if the operands are taken to be the required amount of consecutive digits from the ninth decimal representation of , starting from the rd digit of the fractional part. To avoid ambiguity, the answer is counted for a fixed set of the required amount of unique letters.

Input

The file contains a single line with the number .

Output

One integer — the answer.

Examples

Example 1

Loading
Loading

Note

It is assumed, as a proven statement, that the set of common letters between the modern Ukrainian and Old Georgian alphabets is empty.