Under construction

Still being built. Things may change

Calculating Powers of Two

Interview

Time limit1sMemory limit512 MB

Summary
Given the final value Taeyoung got after subtracting 1 once during his powers-of-two computation, find which step K he made that mistake at.
Level

Easy3 of 10

Topics
Math, Binary search, Implementation, Bit manipulation
Solved
No attempts yet

Problem

Taeyoung's hobby is computing powers of two.

Taeyoung knows that 264=18 446 744 073 709 551 6162^{64} = 18\,446\,744\,073\,709\,551\,616, and he will compute 2642^{64} by hand, starting from 202^0 and multiplying by 2 each time.

However, while multiplying by 2, Taeyoung made the mistake of subtracting 1 exactly once. (He makes the mistake only once, and after that he performs the multiplication by 2 correctly.)

For example, he computes 21=22^1 = 2 correctly, then makes the absurd mistake of computing 22=32^2 = 3.

Then he goes on to compute 23=62^3 = 6, 24=122^4 = 12, and so on, so the error grows larger and larger.

Given NN, the value of 2642^{64} that Taeyoung obtained, find the step where he made his first mistake.

Input

A positive integer NN is given.

NN is a value that can result when Taeyoung computes 2642^{64}.

Output

Find the step where Taeyoung made his first mistake.

Print KK for the case where he computed 2K=2K−12^K = 2^{K-1}.

Constraints

  • 2≤N≤18 446 744 073 709 551 615=264−12 \le N \le 18\,446\,744\,073\,709\,551\,615 = 2^{64} - 1

Examples1

  1. Example 1

    Input
    18446744073709551615
    
    Expected output
    64