#t113. 与或和2025
与或和2025
AND-OR Sum 2025
Problem Description
Little A has an integer . He wants to find the smallest positive integer such that the following equation holds:
$(x \operatorname{and} y) + (x \operatorname{or} y) = 2025$
Here denotes the bitwise AND operation and denotes the bitwise OR operation. If no such exists, output .
Input Format
One line containing one integer .
Output Format
One line containing one integer: if a satisfying exists, output ; otherwise output .
Sample Input
1025
Sample Output
1000
Sample Explanation
By a property of bitwise operations, for any integers we always have $(x \operatorname{and} y) + (x \operatorname{or} y) = x + y$.
Therefore the original equation is equivalent to , which gives . When , , and is a positive integer, so output .
Constraints
For all test cases, .