Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/while-2-ning-darajasi-korsatkichi

Exponent of a power of two

Easy 1000 ms 64 MB 24%
Share

A positive integer $n$ is given that equals some integer power of $2$ ($n = 2^{k}$, $k \ge 0$). Find the exponent $k$.

Finding the exponent from a power of two

Input

One integer $n$.

Output

One integer — $k$.

Note

$1 \le n \le 2^{30}$

Examples

Input #1
1
Output #1
0
Input #2
2
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.