Makes solves problems on Decoforces and lots of other different online judges. Each problem is denoted by its difficulty — a positive integer number. Difficulties are measured the same across all the judges (the problem with difficulty d on Decoforces is as hard as the problem with difficulty d on any other judge). 

Makes has chosen n problems to solve on Decoforces with difficulties a_1, a_2, ..., a_{n}. He can solve these problems in arbitrary order. Though he can solve problem i with difficulty a_{i} only if he had already solved some problem with difficulty $d \geq \frac{a_{i}}{2}$ (no matter on what online judge was it).

Before starting this chosen list of problems, Makes has already solved problems with maximum difficulty k.

With given conditions it's easy to see that Makes sometimes can't solve all the chosen problems, no matter what order he chooses. So he wants to solve some problems on other judges to finish solving problems from his list. 

For every positive integer y there exist some problem with difficulty y on at least one judge besides Decoforces.

Makes can solve problems on any judge at any time, it isn't necessary to do problems from the chosen list one right after another.

Makes doesn't have too much free time, so he asked you to calculate the minimum number of problems he should solve on other judges in order to solve all the chosen problems from Decoforces.


-----Input-----

The first line contains two integer numbers n, k (1 ≤ n ≤ 10^3, 1 ≤ k ≤ 10^9).

The second line contains n space-separated integer numbers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^9).


-----Output-----

Print minimum number of problems Makes should solve on other judges in order to solve all chosen problems on Decoforces.


-----Examples-----
Input
3 3
2 1 9

Output
1

Input
4 20
10 3 6 3

Output
0



-----Note-----

In the first example Makes at first solves problems 1 and 2. Then in order to solve the problem with difficulty 9, he should solve problem with difficulty no less than 5. The only available are difficulties 5 and 6 on some other judge. Solving any of these will give Makes opportunity to solve problem 3.

In the second example he can solve every problem right from the start.

Difficulty: interview

Starter code:

Solutions:
R=lambda:list(map(int,input().split()))
n,k=R()
a=sorted(R())
b=0
for i in a:
  while i>k+k:
    k+=k
    b+=1
  k=max(k,i)
print(b)



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

n,k=list(map(int,input().split()))

ans=0
for i in sorted(map(int,input().split())):
    while i>2*k:
        ans+=1
        k*=2
    k=max(k,i)

print(ans)


n,k=list(map(int,input().split()))
x=0
for d in sorted(map(int,input().split())):
    while 2*k<d:
        k*=2
        x+=1
    k=max(k,d)
print(x)


n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

a.sort()
curr = 0
ans = 0
while curr < len(a):
    if k >= a[curr] / 2:
        k = max(k, a[curr])
        curr += 1
    else:
        ans += 1
        k *= 2

print(ans)


n, k = list(map(int, input().split()))
a = sorted(map(int, input().split()), reverse = True)
while len(a) > 0 and a[-1] <= k:
    a.pop()

a.append(k)
ans = 0
while len(a) > 1:
    u, v= a[-1], a[-2]
    while u * 2 < v:
        ans += 1
        u *= 2
    a.pop()
print(ans)


n, k = list(map(int, input().split()))
s = [int(i) for i in input().split()]
s.sort()
ans = 0
for i in s:
    while k<i/2:
        ans+=1
        k=2*k
    k = max(k, i)
print(ans)



from sys import stdin, stdout
EPS = 10 ** (-20)
INF = float('inf')
size = 10 ** 6

n, k = map(int, stdin.readline().split())
values = sorted(list(map(int, stdin.readline().split())))
i = 0
ans = 0

while i < n:
    if 2 * k >= values[i]:
        k = max(k, values[i])
        i += 1
    else:
        k *= 2
        ans += 1

stdout.write(str(ans))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
a = list(sorted(a))
d = k
ans = 0
for ai in a:
    while 2 * d < ai:
        d *= 2
        ans += 1
    d = max(d, ai)

print(ans)


n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(n):
    while (k * 2 < a[i]):
        k *= 2
        ans += 1
    k = max(k, a[i])
print(ans)
    


n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()

result = 0

for d in a:
	while d > 2*k:
		k *= 2
		result += 1
	k = max(d, k)

print(result)

import sys

def main():
    n, k = map(int,sys.stdin.readline().split())
    a = list(map(int,sys.stdin.readline().split()))
    
    a = sorted(a)

    ans = 0
    for i in range(n):
        if k*2>=a[i]:
            k = max(k,a[i])
        else:
            t = a[i]
            while t>k*2:
                if t%2==1:
                    t= int(t/2)+1
                else:
                    t = int(t/2)
                ans+=1
            k = a[i]

    print(ans)

main()

n,k = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
cnt = 0
for a in A:
	while a > 2 * k:
		cnt += 1
		k *= 2
	k = max(k, a)
print(cnt)

n, k = list(map(int, input().split()))
s = sorted(tuple(map(int, input().split())))
max = k
ans = 0
for a in s:
    if a > max:
        while max < a / 2:
            max = max * 2
            ans = ans + 1
        max = a
print(ans)


import math 
def main():
    n, k = list(map(int, input().split()))
    P = list(map(int, input().split()))
    P.sort()

    M = k
    count = 0
    for num in P:
        f = math.ceil(math.log2(num/M)) - 1
        # print(num/M, f)
        if f < 1:
            pass
        else:
            count += f
        M = max(M, num)
    print(count)

def __starting_point():
    # nonlocal stime
    # stime = time.clock()
    main()

__starting_point()

n, k = list(map(int, input().split()))
aa = sorted(map(int, input().split()))

answ = 0

for a in aa:
    while 2 * k < a:
        k *= 2
        answ += 1
    k = max(k, a)

print(answ)


import math

I = lambda: list(map(int, input().split()))
n, k = I()
a = list(I())
# print(a)
ans = 0
for task in sorted(a):
    if math.ceil(task/2) <= k:
        k = max(task, k)
        continue
    else:
        while not math.ceil(task/2) <= k:
            ans += 1
            k *= 2
        k = task

print(ans)



n, k = map(int, input().split(' '))
problems = list(map(int, input().split(' ')))

problems.sort()
# easy = []

# for i in range(len(problems)):
# 	if problems[i] > k:
# 		problems = problems[i:]
# 		break

max_solved = k
problem_index = 0
n_has_to_solve = 0

while problem_index < n:
	if problems[problem_index] <= max_solved * 2:
		max_solved = max(max_solved, problems[problem_index])
		problem_index += 1
	else:
		max_solved *= 2
		n_has_to_solve += 1

print(n_has_to_solve)


def MultiJudge(l,p):
	count=0
	before=True
	l.sort()
	h=[x for x in l if x<=2*p]
	if len(h) >0 and max(h)>p:
		p=max(h)
	b=[x for x in l if x>2*p]
	while len(b)>0:
		h=[x for x in l if x<=2*p]
		b=[x for x in l if x>2*p]
		if len(h) >0 and max(h)>p:
			p=max(h)
			before=False
		#b=[x for x in l if x>2*p]
		if len(b)>0 and before:
			p=p*2
			count+=1
		before=True
	print(count)

p=int(input().split()[1])
l=[int(x) for x in input().split()]
MultiJudge(l,p)

read = lambda: map(int, input().split())
n, k = read()
a = sorted(read())
cur = k
ans = 0
for i in a:
    while cur * 2 < i:
        cur *= 2
        ans += 1
    cur = max(cur, i)
print(ans)

n, k = map(int, input().split())
a = sorted(list(map(int, input().split())))
answer = 0
for elem in a:
    while 2 * k < elem:
        k *= 2
        answer += 1
    k = max(k, elem)
print(answer)

n, k = map(int, input().split())
a = sorted(map(int, input().split()))
t = 0
x = 0
while max(a) > 2*k:
  while a[x] <= 2*k:
    x += 1
  if x > 0:
    k = max(k, a[x-1])
  while 2*k < a[x]:
    k *= 2
    t += 1
print(t)

n, k = map(int, input().split())

l = sorted([int(x) for x in input().split()])

ans = 0

for i in range(len(l)):
        while 2 * k < l[i]:
                        ans += 1
                        k *= 2
        k = max(k, l[i])
        
print(ans)

n, k = map(int, input().split(" "))

arr = sorted([int(i) for i in input().split(" ")])

answer = 0
for i in range(n):
    while 2 * k < arr[i]:
        answer += 1
        k *= 2
    k = max(k, arr[i])

print(answer)

n,k=map(int,input().split())
ans=0
for i in sorted(map(int,input().split())):
 while i>2*k:
  ans+=1
  k*=2
 k=max(k,i)
print(ans)

def judge():
    count = 0
    S = input()
    T = input()
    sList = S.split()
    sList = [int(i) for i in sList]
    tList = T.split()
    n = sList[0]
    k = sList[1]
    tList = [int(i) for i in tList]
    uList = sorted(tList)
    for num in uList:
        if (2*k >= num):
            if (k<num):
                k = num
            pass
        else:
            while True:
                k = 2*k
                count += 1
                if (2*k >= num):
                    if (k < num):
                        k = num
                    break
    print(count)


judge()