Time limit: 0.1s
Memory limit: 3MB
Input:
Output:
You are given a strictly positive integer written in base 16.
Task
Calculate the floor of the base-2 logarithm of .
More formally, calculate .
Input
A strictly positive integer written in base 16.
Output
The natural number written in base 10.
Restrictions
- has maximum digits in base 16;
- can contain leading zeros;
- The digits in base 16 are, in order,
0123456789ABCDEF
.
Example 1
stdin
001
stdout
0
Example 2
stdin
4A
stdout
6
Explanation
In the first example, is , so .
In the second example, is , so .