Problem2340--log2(N)

2340: log2(N)

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 200200 points

Problem Statement

Given a positive integer NN, find the maximum integer kk such that 2^k \le N2kN.

Constraints

  • NN is an integer satisfying 1 \le N \le 10^{18}1N1018.

Input

Input is given from Standard Input in the following format:
NN

Output

Print the answer as an integer.

Sample Input Copy

6

Sample Output Copy

2

HINT

  • k=2 satisfies 2^2=4 \le 622=46.
  • For every integer kk such that k \ge 3k32^k > 62k>6 holds.

Therefore, the answer is k=2k=2.

Source/Category