Number Partitioning
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a positive integer N, your task is to find the number of ways to partition this number into positive summands such that the sums of the summands in even and odd positions are equal. Additionally, at no point in the partition should the sum of the summands in even positions exceed the sum of those in odd positions (the summands are numbered starting from 1).
For instance, when N=6, there are 5 valid partitions:
3+3
2+2+1+1
2+1+1+2
1+1+2+2
1+1+1+1+1+1
The result should be provided modulo 1000000009 (10^9
+ 9).
Constraints
0 < N ≤
10^6
Input
The input consists of a single line containing the integer N.
Output
Output a single line with the answer to the problem.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 33
Acceptance rate 42%