Cossack Vus and Addition#10283

Cossack Vus and Addition

1 second
256 megabytes
Medium

The renowned Cossack Vus has a lesser-known friend, Vozak Kus, who enjoys adding numbers in columns. However, much to his family's dismay, he often does it incorrectly.

Vozak Kus adds two numbers, and , each with digits, using the following method, starting from the last digits:

  1. If there is a dot above the current digits, ignore it.

  2. Add the corresponding digits of numbers and to obtain a number .

  3. Write the last digit of in the corresponding position in the result.

  4. If x > 9, place a dot above the previous digits.

  5. Move to the previous digits and repeat from step .

For instance, using Vozak Kus's method, 123 + 135 = 258, and 789 + 422 = 101.

Cossack Vus is curious about how many pairs of numbers and , each of length , exist for which his friend calculates the sum correctly.

Note that numbers with leading zeros should not be counted. For example, the number for n=3 is invalid. Additionally, the pairs of numbers and are considered distinct.

Input

The first line contains a single integer (1 \leq n \leq 5).

Output

Output a single number — the answer to the problem.

Examples

Example 1

Loading
Loading

Note

Here are some examples of pairs of length : , , , , etc.