Chef is multi-talented. He has developed a cure for coronavirus called COVAC-19. Now that everyone in the world is infected, it is time to distribute it throughout the world efficiently to wipe out coronavirus from the Earth. Chef just cooks the cure, you are his distribution manager.
In the world, there are $N$ countries (numbered $1$ through $N$) with populations $a_1, a_2, \ldots, a_N$. Each cure can be used to cure one infected person once. Due to lockdown rules, you may only deliver cures to one country per day, but you may choose that country arbitrarily and independently on each day. Days are numbered by positive integers. On day $1$, Chef has $x$ cures ready. On each subsequent day, Chef can supply twice the number of cures that were delivered (i.e. people that were cured) on the previous day. Chef cannot supply leftovers from the previous or any earlier day, as the cures expire in a day. The number of cures delivered to some country on some day cannot exceed the number of infected people it currently has, either.
However, coronavirus is not giving up so easily. It can infect a cured person that comes in contact with an infected person again ― formally, it means that the number of infected people in a country doubles at the end of each day, i.e. after the cures for this day are used (obviously up to the population of that country).
Find the minimum number of days needed to make the world corona-free.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains two space-separated integers $N$ and $x$.
- The second line contains $N$ space-separated integers $a_1, a_2, \ldots, a_N$.

-----Output-----
For each test case, print a single line containing one integer ― the minimum number of days.

-----Constraints-----
- $1 \le T \le 10^3$
- $1 \le N \le 10^5$
- $1 \le a_i \le 10^9$ for each valid $i$
- $1 \le x \le 10^9$
- the sum of $N$ over all test cases does not exceed $10^6$

-----Subtasks-----
Subtask #1 (20 points): $a_1 = a_2 = \ldots = a_N$
Subtask #2 (80 points): original constraints

-----Example Input-----
3
5 5
1 2 3 4 5
5 1
40 30 20 10 50
3 10
20 1 110

-----Example Output-----
5
9
6

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "# cook your dish here\n# cook your dish here\nfrom sys import stdin, stdout\nimport math\nfrom itertools import permutations, combinations,permutations\nfrom collections import defaultdict\nfrom collections import Counter\nfrom bisect import bisect_left\nimport sys\nfrom queue import PriorityQueue\nimport operator as op\nfrom functools import reduce\n\nmod = 1000000007\n\n\ndef L():\n return list(map(int, stdin.readline().split()))\n\n\ndef In():\n return list(map(int, stdin.readline().split()))\n\n\ndef I():\n return int(stdin.readline())\n\n\ndef printIn(ob):\n return stdout.write(str(ob) + '\\n')\n\n\ndef powerLL(n, p):\n result = 1\n while (p):\n  if (p & 1):\n   result = result * n % mod\n  p = int(p / 2)\n  n = n * n % mod\n return result\n\n\ndef ncr(n, r):\n r = min(r, n - r)\n numer = reduce(op.mul, list(range(n, n - r, -1)), 1)\n denom = reduce(op.mul, list(range(1, r + 1)), 1)\n return numer // denom\n\n\n# --------------------------------------\n\ndef myCode():\n n, x = In()\n lst = L()\n count = 0\n lst.sort()\n for i in lst:\n  if (x>=i):\n   count+=1\n   x = max(x,2*i)\n  else:\n   while x<i:\n    count+=1\n    x = 2*x\n   count+=1\n   x = 2*i\n print(count)\ndef main():\n for t in range(I()):\n  myCode()\n  \n\n\ndef __starting_point():\n\n main()\n\n\n\n__starting_point()"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 287914