LogiQuest

140. Catalan Number

MediumCombinatorics

Print the n-th Catalan number Cₙ = C(2n, n) / (n + 1) (the number of valid bracket sequences with n pairs).

Input format

A single integer n.

Output format

Cₙ

Example 1

Input

3

Output

5

Example 2

Input

0

Output

1

Constraints

0 ≤ n ≤ 60

Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.

Loading the MyLoginn IDE…