#D11243. nCm
nCm
nCm
Problem
Given the integer n, output the smallest m such that nCm (the number of combinations that choose m out of n different ones) is even.
Constraints
The input satisfies the following conditions.
- 1 ≤ n ≤ 1018
Input
The input is given in the following format.
n
Output
Output the minimum m such that nCm is an even number on one line.
Examples
Input
2
Output
1
Input
111
Output
16
Input
3
Output
4
inputFormat
outputFormat
output the smallest m such that nCm (the number of combinations that choose m out of n different ones) is even.
Constraints
The input satisfies the following conditions.
- 1 ≤ n ≤ 1018
Input
The input is given in the following format.
n
Output
Output the minimum m such that nCm is an even number on one line.
Examples
Input
2
Output
1
Input
111
Output
16
Input
3
Output
4
样例
3
4