Under construction

Still being built. Things may change

Clean Sequence (Easy)

Interview

Time limit1sMemory limit1024 MB

Summary
Count the clean sequences of length 2N whose score is minimal, where N is at most 10.
Level

Easy3 of 10

Topics
Math, Combinatorics
Solved
No attempts yet

Problem

A clean sequence is a sequence of length 2N2N in which each integer from 11 to NN appears exactly twice.

The score of a clean sequence is the sum, over every integer ii from 11 to NN, of the following value.

  • (sum of the numbers between the two iis) × ii

Here, "between" includes the two endpoint iis.

Count the clean sequences of length 2N2N whose score is minimal.

Input

The first line contains an integer NN (1≤N≤101 \le N \le 10).

Output

On the first line, print the number of clean sequences of length 2N2N whose score is minimal.

Hint

For example, [3,1,2,1,3,2][3, 1, 2, 1, 3, 2] is a clean sequence with N=3N = 3. Its score is calculated as follows, giving 50 points.

The numbers between the two 11s are [1,2,1][1, 2, 1], so (1+2+1)×1(1 + 2 + 1) \times 1 is added to the score.

The numbers between the two 22s are [2,1,3,2][2, 1, 3, 2], so (2+1+3+2)×2(2 + 1 + 3 + 2) \times 2 is added.

The numbers between the two 33s are [3,1,2,1,3][3, 1, 2, 1, 3], so (3+1+2+1+3)×3(3 + 1 + 2 + 1 + 3) \times 3 is added.

The score of this sequence is 4+16+304 + 16 + 30, which is 50. This sequence does not have the minimum score among clean sequences with N=3N = 3.

Examples1

  1. Example 1

    Input
    4
    
    Expected output
    24