Pyramid#246

Pyramid

1 second
64 megabytes
Medium

Let us write the numbers from to in a row (for example, if N = 4):

Below this row, write another row of (N - 1) numbers, where each number is the product of the two numbers directly above it:

Continue this process, writing new rows, each time decreasing the length by one, until only one number remains:

In this way, we obtain an inverted pyramid, with at the vertex.

Input

The first line contains the integer (2 \leq N \leq 50).

Output

Output the first digit of the bottommost number of the pyramid whose base consists of numbers.

Examples

Example 1

Loading
Loading