#D13055. OOllOll
OOllOll
OOllOll
Problem
Let be the sum of each digit when the non-negative integer is expressed in binary. Given a positive integer , output the largest of , , ..., .
Example of calculating the function : When 5 is expressed in binary, it is 101 and the sum of each digit is 1 + 0 + 1 = 2 Therefore, .
Note: https://ja.wikipedia.org/wiki/ Binary
Ouput
Outputs the largest of , , ..., on one line.
Constraints
The input satisfies the following conditions.
Input
The input is given in the following format.
A positive integer is given on one line.
Examples
Input
2
Output
1
Input
9
Output
3
inputFormat
outputFormat
output the largest of , , ..., .
Example of calculating the function : When 5 is expressed in binary, it is 101 and the sum of each digit is 1 + 0 + 1 = 2 Therefore, .
Note: https://ja.wikipedia.org/wiki/ Binary
Ouput
Outputs the largest of , , ..., on one line.
Constraints
The input satisfies the following conditions.
Input
The input is given in the following format.
A positive integer is given on one line.
Examples
Input
2
Output
1
Input
9
Output
3
样例
2
1