You have $n$ coins, each of the same value of $1$.

Distribute them into packets such that any amount $x$ ($1 \leq x \leq n$) can be formed using some (possibly one or all) number of these packets.

Each packet may only be used entirely or not used at all. No packet may be used more than once in the formation of the single $x$, however it may be reused for the formation of other $x$'s.

Find the minimum number of packets in such a distribution.


-----Input-----

The only line contains a single integer $n$ ($1 \leq n \leq 10^9$) — the number of coins you have.


-----Output-----

Output a single integer — the minimum possible number of packets, satisfying the condition above.


-----Examples-----
Input
6

Output
3
Input
2

Output
2


-----Note-----

In the first example, three packets with $1$, $2$ and $3$ coins can be made to get any amount $x$ ($1\leq x\leq 6$).  To get $1$ use the packet with $1$ coin.  To get $2$ use the packet with $2$ coins.  To get $3$ use the packet with $3$ coins.  To get $4$ use packets with $1$ and $3$ coins.  To get $5$ use packets with $2$ and $3$ coins  To get $6$ use all packets. 

In the second example, two packets with $1$ and $1$ coins can be made to get any amount $x$ ($1\leq x\leq 2$).

Difficulty: competition

Starter code:

Solutions:

import sys
#sys.stdin=open("data.txt")
input=sys.stdin.readline

n=int(input())

ans=1
while 2**ans-1<n:
    ans+=1
print(ans)



n = int(input())

r = 0
while n:
    n //= 2
    r += 1

print(r)


from math import ceil, log2

print(ceil(log2(int(input()) + 1)))

cur, add = 0, 1
ans = 0
n = int(input())
while cur < n:
  cur += add
  add *= 2
  ans += 1
print(ans)


from sys import stdin, stdout
from collections import deque
from math import log10


n = int(stdin.readline())
ans = 0

for i in range(0, 31):
    if (1 << i) <= n:
        ans += 1

stdout.write(str(ans))

n = int(input())
p = 1
x = 0
while n > 0:
    x += 1
    n -= p
    p <<= 1

print(x)


#!/usr/bin/env python3
n = int(input())
print(n.bit_length())


from math import log

x = int(input())

print(int(log(x, 2)) + 1)

n = int(input())
cur = 1
ans = 0
while (n > 0) :
	n -= cur
	cur *= 2
	ans += 1
print(ans)

n = int(input())
p = 0
while n > 0:
    p = p + 1
    n = n // 2
print(p)


from math import log2


def __starting_point():
    n = int(input())
    l = int(log2(n)) + 1
    if 2 ** l < n:
        l += 1
    print(l)

__starting_point()

n = int(input())

print(n.bit_length())


import sys
import math
f=sys.stdin
out=sys.stdout

def lPowOf2leqn(n):
    n=n|(n>>1)
    n=n|(n>>2)
    n=n|(n>>4)
    n=n|(n>>8)
    n=n|(n>>16)
    return (n+1)>>1

n=int(f.readline().rstrip('\r\n'))
out.write(str(int(math.log2(lPowOf2leqn(n)))+1)+"\n")

import sys, math
from itertools import permutations

DEBUG = 0
if DEBUG:
    f = open("input.txt", "r")
    input = f.readline
else:
    input = sys.stdin.readline

def mp():
    return list(map(int, input().split()))

def main():
    n = int(input())
    c = 0
    while n:
        n //= 2
        c += 1
    print(c)
main()

#      
import collections, atexit, math, sys, bisect 

sys.setrecursionlimit(1000000)
def getIntList():
    return list(map(int, input().split()))    

try :
    #raise ModuleNotFoundError
    import numpy
    def dprint(*args, **kwargs):
        print(*args, **kwargs, file=sys.stderr)
    dprint('debug mode')
except ModuleNotFoundError:
    def dprint(*args, **kwargs):
        pass



inId = 0
outId = 0
if inId>0:
    dprint('use input', inId)
    sys.stdin = open('input'+ str(inId) + '.txt', 'r') #标准输出重定向至文件
if outId>0:
    dprint('use output', outId)
    sys.stdout = open('stdout'+ str(outId) + '.txt', 'w') #标准输出重定向至文件
    atexit.register(lambda :sys.stdout.close())     #idle 中不会执行 atexit
    
N, = getIntList()
 


res = 0

now = 1

while N>0:
    N-=now
    now*=2
    res+=1

print(res)







USE_STDIO = False

if not USE_STDIO:
    try: import mypc
    except: pass

def main():
    n, = list(map(int, input().split(' ')))
    print(n.bit_length())

def __starting_point():
    main()




__starting_point()

from math import log2
n  = int(input())

a = log2(n+1)
res = int(a)
if a- res > 0:
    res +=1

print(res)

import math
n=int(input())
print(math.ceil(math.log2(n+1)))

n=int(input())
k=1
count=0
while(n>=k):
    k=k*2
    count=count+1
print (count)

n = int(input())

print(len("{0:b}".format(n)))

import math
n=int(input())

print(int(math.log(n,2))+1)

from math import log

n = int(input())

print(int(log(n)/log(2)) + 1)


from math import log2 as l
n = int(input())
k = 2 ** int(l(n)) - 1
if k == n:
    print(int(l(n)))
else:
    print(int(l(n) + 1))


from math import log2, ceil
print(ceil(log2(int(input())+1)))

n=int(input())
k=0
while((2**k)-1<n):
    k+=1
print(k)