Problems
Big difference
Big difference
Positive integer n is given. You are allowed to make an infinite number of permutations of its significant bits, thus obtaining a new number.
What is the greatest difference between such two numbers can be obtained as a result of these operations?
Input
One positive integer n (1 ≤ n ≤ 2·10^9`).
Output
One number - the "big difference".
Input example #1
19
Output example #1
21
Input example #2
1
Output example #2
0
Input example #3
1024
Output example #3
1023