Time

11:45:53
11 Feb 2012
ACM-ICPC Thailand Southern Region Programming Contest 2011
Left: 3 hours 15 minutes
End: 11.02.2012 15:00
Leader: Informatimukas
Five for week 22
Left: 10 hours 15 minutes
End: 11.02.2012 22:00
Leader: NuM
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 →