We write in the number of numbers from 1 to N (in the example N = 4).
1 2 3 4
Now under him write out the number of (N – 1) numbers, each of which is the product of two numbers that are above it:
1 2 3 4
2 6 12
Continue to prescribe the ranks, yet there will be a single number:
1 2 3 4
2 6 12
12 72
864
The result was an inverted pyramid on top of which number 864.
In the first line of input data is the number of N (2 <= N <= 50).
Remove the first digit of the bottom of the pyramid with the base of the N numbers.