#arc143f. [arc143_f]Counting Subsets
[arc143_f]Counting Subsets
Problem Statement
Given a positive integer , find the number, modulo , of subsets of that satisfy the following condition.
- Every positive integer at most can be represented as the sum of some distinct elements of , and there are at most two such representations.
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
3
Sample Output 1
2
The subsets and satisfy the condition.
Sample Input 2
5
Sample Output 2
5
Sample Input 3
1000
Sample Output 3
742952024