Big difference
Medium
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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".
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 2K
Acceptance rate 56%