#K72887. Count Binary-Balanced Strings

    ID: 33853 Type: Default 1000ms 256MiB

Count Binary-Balanced Strings

Count Binary-Balanced Strings

You are given an integer \(n\) representing the length of a binary string. A binary string is considered balanced if it contains an equal number of 0's and 1's. For example, for \(n = 4\), there are 6 balanced binary strings. If \(n\) is odd, no balanced binary string can exist since the counts cannot be equal.

Your task is to calculate the number of binary-balanced strings of length \(n\). The answer is given by the binomial coefficient \(\binom{n}{n/2}\) when \(n\) is even, and by \(0\) when \(n\) is odd.

inputFormat

The input consists of a single integer \(n\) (\(1 \leq n \leq 1000\)), which is the length of the binary string.

The input is provided via stdin.

outputFormat

Output a single integer, representing the number of binary-balanced strings of length \(n\), as calculated by the binomial coefficient \(\binom{n}{n/2}\) when \(n\) is even, or 0 if \(n\) is odd.

The output should be written to stdout.

## sample
4
6