#C652. Count of Balanced Parenthesis Strings
Count of Balanced Parenthesis Strings
Count of Balanced Parenthesis Strings
Given an integer n representing the number of pairs of parentheses, your task is to compute the number of distinct balanced parenthesis strings that can be generated using exactly n pairs. The answer is given by the n-th Catalan number.
The Catalan number C(n) is given by the formula:
\( C(n) = \frac{1}{n+1} \binom{2n}{n} \)
Compute and return the value of \( C(n) \).
inputFormat
The input is received from stdin and consists of a single integer n (1 ≤ n ≤ 19) which represents the number of pairs of parentheses.
outputFormat
Output the computed Catalan number \( C(n) \) to stdout.
## sample1
1