#K9581. Balanced Binary Strings

    ID: 38946 Type: Default 1000ms 256MiB

Balanced Binary Strings

Balanced Binary Strings

Given an integer n, you are required to calculate the number of balanced binary strings of length 2n. A balanced binary string is defined in such a way that its count is given by the Catalan number C(n).

The answer should be computed modulo \(10^9+7\). Formally, you need to calculate:

\[ C(n)=\frac{(2n)!}{(n+1)!n!} \mod (10^9+7), \]

Read the input from standard input and output the result to standard output.

inputFormat

The input consists of a single integer n (where 1 ≤ n).

outputFormat

Output a single integer representing the Catalan number \(C(n)\) modulo \(10^9+7\).

## sample
1
1