#C11440. Partitioning Consecutive Subsequences
Partitioning Consecutive Subsequences
Partitioning Consecutive Subsequences
Given a positive integer \(n\), compute the number of ways to partition the set \(\{1, 2, \dots, n\}\) into non-empty subsets such that every subset consists of consecutive integers. Note that each partition corresponds to choosing a subset of the \(n-1\) gaps between consecutive numbers: a gap is either "cut" or "not cut". Hence, the answer is given by the formula \(2^{n-1}\).
Your task is to implement a function that reads an integer \(n\) from standard input, computes \(2^{n-1}\), and writes the result to standard output.
inputFormat
The input consists of a single integer \(n\) (\(n \ge 1\)) which is read from standard input.
outputFormat
Output a single integer representing the number of valid partitions of the set \(\{1, 2, \dots, n\}\) into contiguous subsequences. The result should be written to standard output.
## sample1
1