Time limit: 0.03s
Memory limit: 128MB
Input:
Output:
The title of the problem has as much to do with the statement as Denise's lyrics have to do with Marius's (for those who know).
On a -indexed binary string of length , you can apply the following operation any number of times:
- Choose an index () such that and remove and from .
After this operation, we get the string .
Task
Given a positive integer , Conte the Swedish asks you to find the number of binary strings of length that can become empty after applying the operation above on them any number of times. Since this number can be very large, calculate it modulo .
Input data
The only line of the input will contain the number .
Output data
Output a single number, the number of binary strings of length that can become empty after applying the operation any number of times.
Constraints and clarifications
- This problem was also given at Prosoft@NT 2024 — there, the subtasks were graded with , , and points.
# | Points | Constraints |
---|---|---|
1 | 3 | |
2 | 11 | |
3 | 38 | |
4 | 48 | No additional constraints. |
Example
stdin
4
stdout
6
Explanation
The strings are , , , , , .