#arc119a. [arc119_a]119 × 2^23 + 1
[arc119_a]119 × 2^23 + 1
Problem Statement
In problems on AtCoder, you are often asked to:
find the answer modulo .
Here, we have . Related to this, solve the following prolem:
You are given an integer .
Print the minimum possible value of for a triple of non-negative integers satisfying .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
998244353
Sample Output 1
143
We have , in other words, the triple satisfies .
The value for this triple is .
There is no such triple where , so is the correct output.
Sample Input 2
1000000007
Sample Output 2
49483
We have , in other words, the triple satisfies .
The value for this triple is .
There is no such triple where , so is the correct output.
Sample Input 3
1
Sample Output 3
1
Note that we have .
Sample Input 4
998984374864432412
Sample Output 4
2003450165