Time

16:02:53
22 May 2012
Version for print

Pyramid

   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 (N1) 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.


Specifications

   Input

   In the first line of input data is the number of N (2 <= N <= 50).

   Output

   Remove the first digit of the bottom of the pyramid with the base of the N numbers.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 4
Complexity: 40% 40/67

Example

Example input

4

Example output

8



← The best approximation of pi (RU) Problems Unhappy bus →