import java.util.*;
import java.io.*;
import java.io.FileWriter;
import java.math.BigInteger;
import java.math.BigDecimal;
// Solution

public class Main
{
  public static void main (String[] argv)
  {
	  new Main();
  }

  boolean test = false;
  final int[][] dirs8 = {{0,1}, {0,-1}, {-1,0}, {1,0}, {1,1},{1,-1},{-1,1},{-1,-1}};
  final int[][] dirs4 = {{0,1}, {0,-1}, {-1,0}, {1,0}};
  final int MOD = 1000000007;  //998244353;

  final int WALL = -1;
  final int EMPTY = -2;
  final int VISITED = 1;
  final int FULL = 2;

  final int START = 1;
  final int END = 0;

  long[] fac;
  long[] ifac;
  long[] rfac;

  int[] mobius;
  int[] sieve;
  int[][] factors;

  //long[] fac = new long[100];
  //long[] ifac = new long[100001];
  public Main()  {
	FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));

    //FastReader in = new FastReader(new BufferedReader(new FileReader("Main.in")));

    //int nt = in.nextInt();
    int nt = 1;
    StringBuilder sb = new StringBuilder();

    //fac[0] = 1;
    //ifac[0] = 1;
    //for (int i = 1; i <= 20; i++) {
      //  fac[i] = fac[i-1] * i % MOD;
      //  ifac[i] = ifac[i-1] * inv(i) % MOD;
    //}
    long[][] C = new long[19][11];

    // Caculate value of Binomial Coefficient
    // in bottom up manner
    for (int i = 0; i <= 18; i++)
    {
        for (int j = 0; j <= min(i, 10); j++)
        {
            // Base Cases
            if (j == 0 || j == i)
                C[i][j] = 1;

            // Calculate value using previously
            // stored values
            else
                C[i][j] = C[i - 1][j - 1] +
                          C[i - 1][j];
        }
    }

    //long[] invs = new long[101];
    //for (int i = 1; i <= 100; i++) invs[i] = inv(i);

    for (int it = 0; it < nt; it++)
    {
       int n = in.nextInt();
       long k = in.nextInt();
       Integer[] a = new Integer[n];
       for (int i = 0; i < n; i++) a[i] = in.nextInt();
       Arrays.sort(a);

       int cnt = 0;

       for (int v : a)
       {
          if (v > k * 2) {

             while (v > k * 2)
             {
                 cnt++;
                 k = k * 2;
             }

          }

          k = Math.max(k, v);
       }
       //sb.append(ans+"\n");
       System.out.println(cnt);
    }

    System.out.print(sb);
  }

  private long[][] matIdentity(int n)
  {
      long[][] a = new long[n][n];
      for (int i = 0; i < n; i++)
          a[i][i] = 1;
      return a;
  }
  private long[][] matPow(long[][] mat0, long p)
  {
      int n = mat0.length;
      long[][] ans = matIdentity(n);
      long[][] mat = matCopy(mat0);
      while (p > 0)
      {
          if (p % 2 == 1){
              ans = matMul(ans, mat);
          }

          p /= 2;
          mat = matMul(mat, mat);
      }
      return ans;
  }

  private long[][] matCopy(long[][] a)
  {
      int n = a.length;
      long[][] b = new long[n][n];
      for (int i = 0; i < n; i++)
          for (int j = 0; j < n; j++)
              b[i][j] = a[i][j];
      return b;
  }
  private long[][] matMul(long[][] a, long[][] b)
  {
      int n = a.length;

      long[][] c = new long[n][n];
      for (int i = 0; i < n; i++)
      {
          for (int j = 0; j < n; j++)
          {
              for (int k = 0; k < n; k++)
                  c[i][j] = (c[i][j] + a[i][k] * b[k][j]) % MOD;
          }
      }

      return c;
  }

  private long[] matMul(long[][] a, long[] b)
  {
      int n = a.length;

      long[] c = new long[n];
      for (int i = 0; i < n; i++)
      {
          for (int j = 0; j < n; j++)
              c[i] = (c[i] + a[i][j] * b[j]) % MOD;
      }

      return c;
  }

  class Mark implements Comparable<Mark> {
      int type, h;
      long x;
      public Mark(int h, long x, int type)
      {
         this.h = h;
         this.x = x;
         this.type = type;
      }

      @Override
      public int compareTo(Mark o)
      {
          if (this.x == o.x) return type - o.type; // let end comes before start
          return Long.compare(x, o.x);
      }
  }

  private boolean coLinear(int[] p, int[] q, int[] r)
  {
      return 1L * (p[1] - r[1]) * (q[0] - r[0]) == 1L * (q[1] - r[1]) * (p[0] - r[0]);
  }

  private void fill(char[] a, int lo, int c, char letter)
  {
      //System.out.println("fill " + lo + " " + c + " " + letter);
      for (int i = lo; i < lo + c; i++) a[i] = letter;
  }

  private int cntBitOne(String s){
      int c = 0, n = s.length();
      for (int i = 0; i < n; i++)
          if (s.charAt(i) == '1') c++;
      return c;
  }

  class DSU {
      int n;
      int[] par;
      int[] sz;
      int nGroup;

      public DSU(int n)
      {
          this.n = n;
          par = new int[n];
          sz = new int[n];
          for (int i = 0;  i < n; i++){
              par[i] = i;
              sz[i] = 1;
          }
          nGroup = n;
      }

      private boolean add(int p, int q) {
          int rp = find(p);
          int rq = find(q);
          if (rq == rp) return false;

          if (sz[rp] <= sz[rq]) {
              sz[rq] += sz[rp];
              par[rp] = rq;
          }else {
              sz[rp] += sz[rq];
              par[rq] = rp;
          }
          nGroup--;
          return true;
      }

      private int find(int p)
      {
          int r = p;
          while (par[r] != r) r = par[r];

          while (r != p) {
              int t = par[p];
              par[p] = r;
              p = t;
          }
          return r;
      }

  }

  // μ(n) = 1 if n is a square-free positive integer with an even number of prime factors. e.g.  6, 15
  // μ(n) = −1 if n is a square-free positive integer with an odd number of prime factors. e.g.  2, 3, 5, 2*3*5
  // μ(n) = 0 if n has a squared prime factor. e.g : 2*2,  3*3*5
  private void build_mobius_function(int n)
  {
      mobius = new int[n+1];
      sieve = new int[n+1];
      factors = new int[n+1][];
      //for (int i = 1; i <= n; i++)factors[i] = new ArrayList<>();
      for (int i = 2; i <= n; i++)
        sieve[i] = i;
      for (int i = 2; i <= n; i++)
      {
        if (sieve[i] == i){
            mobius[i] = -1;
            for (long j = 1L * i * i; j <= n; j += i)
                sieve[(int)j] = i;
        }
      }

      for (int i = 6; i <= n; i++)
      {
          if (sieve[i] != i) {
              int pre = i / sieve[i];
              if (pre % sieve[i] != 0)
                  mobius[i] = -mobius[pre];
          }
      }
      int[] sz = new int[n+1];
      long tot = 0;
      for (int i = 2; i <= n; i++)
      {
          if (mobius[i] != 0)
          {
              for (int j = i * 2; j <= n; j += i) {
                  sz[j]++;
                  tot++;
              }
          }
      }
      for (int i = 2; i <= n; i++) {
          factors[i] = new int[sz[i]];
          sz[i] = 0;
      }

      for (int i = 2; i <= n; i++)
      {
          if (mobius[i] != 0)
          {
              for (int j = i * 2; j <= n; j += i) {
                  factors[j][sz[j]++] = i;
                  //factors[j].add(i);
              }
          }
      }
      //System.out.println("tot  =  "  + tot);
  }

  private int[] build_z_function(String s)
  {
      int n = s.length();
      int[] zfun = new int[n];

      int l = -1, r = -1;
      for (int i = 1; i < n; i++)
      {
         // Set the start value
         if (i <= r)
            zfun[i] = Math.min(zfun[i-l], r - i + 1);

         while (i + zfun[i] < n && s.charAt(i + zfun[i]) == s.charAt(zfun[i]))
             zfun[i]++;

         if (i + zfun[i] - 1> r){
             l = i;
             r = i + zfun[i] - 1;
         }
      }

      if (test)
      {
          System.out.println("Z-function of " + s);
          for (int i = 0; i < n; i++) System.out.print(zfun[i] + " ");
          System.out.println();
      }
      return zfun;
  }

  class BIT {
      int[] bit;
      int n;

      public BIT(int n){
          this.n = n;
          bit = new int[n+1];
      }

      private int query(int p)
      {
          int sum = 0;
          for (; p > 0; p -= (p & (-p)))
             sum += bit[p];

          return sum;
      }

      private void add(int p, int val)
      {
         //System.out.println("add to BIT " + p);
         for (; p <= n; p += (p & (-p)))
            bit[p] += val;
      }

  }

  private List<Integer> getMinFactor(int sum)
  {
      List<Integer>  factors = new ArrayList<>();

               for (int sz = 2; sz <= sum / sz; sz++){
                   if (sum % sz == 0) {
                       factors.add(sz);
                       factors.add(sum / sz);
                   }
               }
               if (factors.size() == 0)
                   factors.add(sum);

      return factors;
  }

  /* Tree class */
  class Tree {
      int V = 0;
      int root = 0;
      List<Integer>[] nbs;
      int[][] timeRange;
      int[] subTreeSize;
      int t;
      boolean dump = false;

      public Tree(int V, int root)
      {
          if (dump)
              System.out.println("build tree with size = " + V + ", root = " + root);

          this.V = V;
          this.root = root;
          nbs = new List[V];
          subTreeSize = new int[V];
          for (int i = 0; i < V; i++)
              nbs[i] = new ArrayList<>();

      }

      public void doneInput()
      {
          dfsEuler();
      }

      public void addEdge(int p, int q)
      {
          nbs[p].add(q);
          nbs[q].add(p);
      }

      private void dfsEuler()
      {
          timeRange = new int[V][2];
          t = 1;
          dfs(root);
      }

      private void dfs(int node)
      {
          if (dump)
              System.out.println("dfs on node " + node + ", at time " + t);
          timeRange[node][0] = t;

          for (int next : nbs[node]) {
              if (timeRange[next][0] == 0)
              {
                  ++t;
                  dfs(next);
              }
          }
          timeRange[node][1] = t;
          subTreeSize[node] = t - timeRange[node][0] + 1;
      }

      public List<Integer> getNeighbors(int p) {
          return nbs[p];
      }

      public int[] getSubTreeSize(){
          return subTreeSize;
      }

      public int[][] getTimeRange()
      {
          if (dump){
              for (int i = 0; i < V; i++){
                  System.out.println(i + ": " + timeRange[i][0] + " - " + timeRange[i][1]);
              }
          }
          return timeRange;
      }

  }

  /* segment tree */
  class SegTree {
      int[] a;
      int[] tree;
      int[] treeMin;
      int[] treeMax;
      int[] lazy;
      int n;
      boolean dump = false;

      public SegTree(int n)
      {
          if (dump)
              System.out.println("create segTree with size " + n);
          this.n = n;
          treeMin = new int[n*4];
          treeMax = new int[n*4];
          lazy = new int[n*4];
      }

      public SegTree(int n, int[] a) {
          this(n);
          this.a = a;
          buildTree(1, 0, n-1);
      }

      private void buildTree(int node, int lo, int hi)
      {
          if (lo == hi) {
              tree[node] = lo;
              return;
          }

          int m = (lo + hi) / 2;
          buildTree(node * 2, lo, m);
          buildTree(node * 2 + 1, m + 1, hi);
          pushUp(node, lo, hi);
      }

      private void pushUp(int node, int lo, int hi)
      {
          if (lo >= hi) return;

          // note that, if we need to call pushUp on a node, then lazy[node] must be zero.

          //the true value is the value + lazy
          treeMin[node] = Math.min(treeMin[node * 2] + lazy[node * 2], treeMin[node * 2 + 1] + lazy[node * 2 + 1]);
          treeMax[node] = Math.max(treeMax[node * 2] + lazy[node * 2], treeMax[node * 2 + 1] + lazy[node * 2 + 1]);
          // add combine fcn
      }

      private void pushDown(int node, int lo, int hi)
      {
          if (lazy[node] == 0) return;

          int lz = lazy[node];
          lazy[node] = 0;

          treeMin[node] += lz;
          treeMax[node] += lz;

          if (lo == hi) return;

          int mid = (lo + hi) / 2;
          lazy[node * 2] += lz;
          lazy[node * 2 + 1] += lz;
      }

      public int rangeQueryMax(int fr, int to)
      {
          return rangeQueryMax(1, 0, n-1, fr, to);
      }

      public int rangeQueryMax(int node, int lo, int hi, int fr, int to)
      {
          if (lo == fr && hi == to)
              return treeMax[node] + lazy[node];

          int mid = (lo + hi) / 2;
          pushDown(node, lo, hi);

          if (to <= mid) {
              return rangeQueryMax(node * 2, lo, mid, fr, to);
          }else if (fr > mid)
              return rangeQueryMax(node * 2 + 1, mid + 1, hi, fr, to);
          else {
              return Math.max(rangeQueryMax(node * 2, lo, mid, fr, mid),
                              rangeQueryMax(node * 2 + 1, mid + 1, hi, mid + 1, to));
          }
      }

      public int rangeQueryMin(int fr, int to)
      {
          return rangeQueryMin(1, 0, n-1, fr, to);
      }

      public int rangeQueryMin(int node, int lo, int hi, int fr, int to)
      {
          if (lo == fr && hi == to)
              return treeMin[node] + lazy[node];

          int mid = (lo + hi) / 2;
          pushDown(node, lo, hi);

          if (to <= mid) {
              return rangeQueryMin(node * 2, lo, mid, fr, to);
          }else if (fr > mid)
              return rangeQueryMin(node * 2 + 1, mid + 1, hi, fr, to);
          else {
              return Math.min(rangeQueryMin(node * 2, lo, mid, fr, mid),
                              rangeQueryMin(node * 2 + 1, mid + 1, hi, mid + 1, to));
          }
      }

       public void rangeUpdate(int fr, int to, int delta){
           rangeUpdate(1, 0, n-1, fr, to, delta);
       }

      public void rangeUpdate(int node, int lo, int hi, int fr, int to, int delta){
          pushDown(node, lo, hi);
          if (fr == lo && to == hi)
          {
              lazy[node] = delta;
              return;
          }

          int m = (lo + hi) / 2;
          if (to <= m)
              rangeUpdate(node * 2, lo, m, fr, to, delta);
          else if (fr > m)
              rangeUpdate(node * 2 + 1, m + 1, hi, fr, to, delta);
          else  {
              rangeUpdate(node *  2, lo, m, fr, m, delta);
              rangeUpdate(node * 2 + 1, m + 1, hi, m + 1, to, delta);
          }

          // re-set the in-variant
          pushUp(node, lo, hi);
      }

      public int query(int node, int lo, int hi, int fr, int to)
      {
          if (fr == lo && to == hi)
              return tree[node];

          int m = (lo + hi) / 2;
          if (to <= m)
              return  query(node * 2, lo, m, fr, to);
          else if (fr > m)
              return query(node * 2 + 1, m + 1, hi, fr, to);

          int lid = query(node * 2, lo, m, fr, m);
          int rid = query(node * 2 + 1, m + 1, hi, m + 1, to);
          return a[lid] >= a[rid] ? lid : rid;
      }

  }

  private long inv(long v)
  {
      return pow(v, MOD-2);
  }

  private long pow(long v, long p)
  {
      long ans = 1;
      while (p > 0)
      {
          if (p % 2 == 1)
              ans = ans * v % MOD;
          v = v * v % MOD;
          p = p / 2;
      }
      return ans;
  }

  private double dist(double x, double y, double xx, double yy)
  {
      return Math.sqrt((xx - x) * (xx - x) + (yy - y) * (yy - y));
  }

  private int mod_add(int a, int b) {
      int v = a + b;
      if (v >= MOD) v -= MOD;
      return v;
  }

  private long overlap(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
      if (x1 > x3) return overlap(x3, y3, x4, y4, x1, y1, x2, y2);

      if (x3 > x2 || y4 < y1 || y3 > y2) return 0L;

      //(x3, ?, x2, ?)
      int yL = Math.max(y1, y3);
      int yH = Math.min(y2, y4);
      int xH = Math.min(x2, x4);

      return f(x3, yL, xH, yH);
  }
  //return #black cells in rectangle
  private long f(int x1, int y1, int x2, int y2) {
      long dx = 1L + x2 - x1;
      long dy = 1L + y2 - y1;
      if (dx % 2 == 0 || dy % 2 == 0 || (x1 + y1) % 2 == 0)
          return 1L * dx * dy / 2;
      return 1L * dx * dy / 2 + 1;
  }

  private int distM(int x, int y, int xx, int yy) {
      return abs(x - xx) + abs(y - yy);
  }

  private boolean less(int x, int y, int xx, int yy) {
      return x < xx || y > yy;
  }

  private int mul(int x, int y) {
      return (int)(1L * x * y % MOD);
  }

  private int nBit1(int v) {
      int v0 = v;
      int c = 0;
      while (v != 0) {
          ++c;
          v = v & (v - 1);
      }
      return c;
  }

  private long abs(long v) {
      return v > 0 ? v : -v;
  }

  private int abs(int v) {
      return v > 0 ? v : -v;
  }

  private int common(int v) {
      int c = 0;
      while (v != 1) {
          v = (v >>> 1);
          ++c;
      }

      return c;
  }

  private void reverse(char[] a, int i, int j) {
      while (i < j) {
          swap(a, i++, j--);
      }
  }

  private void swap(char[] a, int i, int j) {
      char t = a[i];
      a[i] = a[j];
      a[j] = t;
  }

  private int gcd(int x, int y) {
      if (y == 0) return x;
      return gcd(y, x % y);
  }
  private long gcd(long x, long y) {
      if (y == 0) return x;
      return gcd(y, x % y);
  }
  private int max(int a, int b) {
      return a >  b ? a : b;
  }

  private long max(long a, long b) {
      return a >  b ? a : b;
  }

  private int min(int a, int b) {
      return a >  b ? b : a;
  }

  private long min(long a, long b) {
      return a >  b ? b : a;
  }

  static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(BufferedReader in)
        {
            br = in;
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    String line = br.readLine();
                    if (line == null || line.length() == 0) return "";
                    st = new StringTokenizer(line);
                }
                catch (IOException  e)
                {
                    return "";
                    //e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                return null;
                //e.printStackTrace();
            }
            return str;
        }
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.x=x;
            this.y=y;

        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static class Pai{
        Integer i;
        String s;
        public Pai(Integer i,String s){
            this.i=i;
            this.s=s;
        }
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int n=sc.ni();
        int k=sc.ni();
        Integer arr[]=new Integer[n];
        for(int i=0;i<n;i++)arr[i]=sc.ni();
        Arrays.sort(arr);
        int ans=0;
        long dif=k;
        for(int i=0;i<n;i++){
            if(2*dif>=arr[i])continue;
            else{
                dif*=2;
                ans++;
            }
        }
        w.println(ans);
        w.close();
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.x=x;
            this.y=y;

        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static class Pai{
        Integer i;
        String s;
        public Pai(Integer i,String s){
            this.i=i;
            this.s=s;
        }
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int n=sc.ni();
        int k=sc.ni();
        Integer arr[]=new Integer[n];
        for(int i=0;i<n;i++)arr[i]=sc.ni();
        Arrays.sort(arr);
        int ans=0;
        long dif=k;
        for(int i=0;i<n;i++){
            while(2*dif<arr[i]){
                dif*=2;
                ans++;
            }
            if(2*dif>=arr[i]){
                dif=Math.max(dif,arr[i]);
                continue;
            }
        }
        w.println(ans);
        w.close();
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x && y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.x=x;
            this.y=y;

        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static class Pai{
        Integer i;
        String s;
        public Pai(Integer i,String s){
            this.i=i;
            this.s=s;
        }
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int n=sc.ni();
        int k=sc.ni();
        Integer arr[]=new Integer[n];
        for(int i=0;i<n;i++)arr[i]=sc.ni();
        Arrays.sort(arr);
        int ans=0;
        long dif=k;
        for(int i=0;i<n;i++){
            if(2*dif>=arr[i]){
                dif=Math.max(dif,arr[i]);
                continue;
            }
            else{
                dif*=2;
                ans++;
            }
        }
        w.println(ans);
        w.close();
    }
}


import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;

public class Main
{

	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[101]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}

	public static void main(String[] args) throws IOException
	{
		Reader s=new Reader();PrintWriter pw=new PrintWriter(System.out);
                int n=s.nextInt(),i; double k=s.nextDouble(),max=0;
                for(i=0;i<n;i++){
                 double x=s.nextDouble();
                 max=(double)Math.max(max, x);
                }
                int ans=2*k>=max?0:(int)Math.ceil(Math.log(max/k)/Math.log(2))-1;
                pw.write(String.valueOf(ans));
                pw.flush();pw.close();
	}

}


import java.util.Arrays;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;

public class Main
{

	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[101]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}

        static int BS(int l,int r,int a[],int v){
         int rs=0;
         while(l!=r){
          int m=(l+r)/2;
          if(a[m]==v){
           rs=m;break;
          }
          else if(a[m]>v)r=m;
          else l=m+1;
         }
         if(l==r){
          rs=l;
          if(a[rs]>=v)--rs;
         }
         return rs;
        }

	public static void main(String[] args) throws IOException
	{
		Reader s=new Reader();PrintWriter pw=new PrintWriter(System.out);
                int n=s.nextInt(),i,k=s.nextInt(),cnt=0;
                int a[]=new int[n];
                for(i=0;i<n;i++){
                 a[i]=s.nextInt();
                }Arrays.sort(a);
                int l=BS(0,n-1,a,k)+1,tl=0,v=2*k;

                while(l<n){
                 tl=BS(l,n-1,a,v);
                 if(tl<l){
                  v=2*v;
                  cnt++;
                 }
                 else{
                  v=2*a[tl];
                  l=tl+1;
                 }
                }
                pw.write(String.valueOf(cnt));
                pw.flush();pw.close();
	}

}


import java.util.Arrays;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;

public class Main
{

	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[101]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}

        static int BS(int l,int r,int a[],int v){
         int rs=0;
         while(l!=r){
          int m=(l+r)/2;
          if(a[m]==v){
           rs=m;break;
          }
          else if(a[m]>v)r=m;
          else l=m+1;
         }
         if(l==r){
          rs=l;
          if(a[rs]>v)--rs;
         }
         return rs;
        }

	public static void main(String[] args) throws IOException
	{
		Reader s=new Reader();PrintWriter pw=new PrintWriter(System.out);
                int n=s.nextInt(),i,k=s.nextInt(),cnt=0;
                int a[]=new int[n];
                for(i=0;i<n;i++){
                 a[i]=s.nextInt();
                }Arrays.sort(a);
                int l=BS(0,n-1,a,k)+1,tl=0,v=2*k;

                while(l<n){
                 tl=BS(l,n-1,a,v);
                 if(tl<l){
                  v=2*v;
                  cnt++;
                 }
                 else{
                  v=2*a[tl];
                  l=tl+1;
                 }
                }
                pw.write(String.valueOf(cnt));
                pw.flush();pw.close();
	}

}


import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;

public class Main
{

	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[101]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}

	public static void main(String[] args) throws IOException
	{
		Reader s=new Reader();PrintWriter pw=new PrintWriter(System.out);
                int n=s.nextInt(),k=s.nextInt(),i,max=0;
                for(i=0;i<n;i++){
                 int x=s.nextInt();
                 max=(int)Math.max(max, x);
                }
                int ans=2*k>=max?0:(int)Math.ceil(Math.log(max/k)/Math.log(2))-1;
                pw.write(String.valueOf(ans));
                pw.flush();pw.close();
	}

}


import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class RobinKarp {

	public static void main(String[] args) throws IOException {

		Scanner in = new Scanner(System.in);

		int n = in.nextInt();

		int max = in.nextInt();

		List<Integer> need = new ArrayList<>();

		for(int i=0; i<n; i++) {
			need.add(in.nextInt());
		}

		Collections.sort(need);

		int ans = 0;

		for(int i=0; i<n; i++) {

			while(max * 2 < need.get(i)) {

				max = max*2;
				ans++;

			}

			max = Math.max(max, need.get(i));
		}

		System.out.println(ans);

	}

}


import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class RobinKarp {

	public static void main(String[] args) throws IOException {

		Scanner in = new Scanner(System.in);

		int n = in.nextInt();

		int max = in.nextInt();

		List<Integer> need = new ArrayList<>();

		for(int i=0; i<n; i++) {
			need.add(in.nextInt());
		}

		Collections.sort(need);

		for(int i=0; i<n; i++) {

			if(max * 2 < need.get(i)) {
				System.out.println(1);
				return;
			}

			max = Math.max(max, need.get(i));
		}

		System.out.println(0);

	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.stream.IntStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.util.OptionalInt;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author AsgarJ
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        FastWriter out = new FastWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, FastWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = in.readIntArray(n);
            int maxa = IntStream.of(a).max().getAsInt();

            int res = 0;
            while ((k << 1) < maxa) {
                res++;
                k <<= 1;
            }
            out.println(res);
        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = nextInt();
            return array;
        }

    }

    static class FastWriter extends PrintWriter {
        public FastWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public FastWriter(Writer writer) {
            super(writer);
        }

        public FastWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.util.Arrays;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author AsgarJ
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        FastWriter out = new FastWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, FastWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = in.readIntArray(n);
            Arrays.sort(a);
            int maxa = a[n - 1];

            int res = 0, l = 0, r = n - 1;
            while ((k << 1) < maxa) {
                int pos = ArrayUtils.upperBound(a, k << 1, l, r);
                if (pos < l || pos > r || a[pos] <= k) {
                    res++;
                    k <<= 1;
                } else {
                    k = a[pos];
                    l = pos + 1;
                }
            }
            out.println(res);
        }

    }

    static class ArrayUtils {
        public static int upperBound(int[] array, int val, int low, int high) {
            while (low <= high) {
                int mid = (low + high) >> 1;
                if (val < array[mid]) high = mid - 1;
                else low = mid + 1;
            }
            return high;
        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = nextInt();
            return array;
        }

    }

    static class FastWriter extends PrintWriter {
        public FastWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public FastWriter(Writer writer) {
            super(writer);
        }

        public FastWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/**
 *
 * @author Parth
 */
public class MultiJudgeSolving {
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st = new StringTokenizer(in.readLine()," ");
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int arr[] = new int[n];
        st = new StringTokenizer(in.readLine()," ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(st.nextToken());
        }
        shuffle(arr);
        Arrays.sort(arr);

        int maxDiff = k;
        int toSolve = 0;
        for(int i=0; i<n; i++){
            if(maxDiff >= (arr[i]%2==0?arr[i]/2:(arr[i]/2+1))){
                if(arr[i]>maxDiff)  maxDiff = arr[i];
            }
            else{
                while(maxDiff < (arr[i]%2==0?arr[i]/2:(arr[i]/2+1))){
                    maxDiff = maxDiff*2;
                    toSolve++;
                }
            }
        }
        out.println(toSolve);

        out.close();
    }

    public static void shuffle(int arr[]){
        Random rnd = new Random();
        int len = arr.length;
        for(int i=0; i<len; i++){
            int rindx = i+rnd.nextInt(len-i);
            int tmp = arr[i];
            arr[i] = arr[rindx];
            arr[rindx] = tmp;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/**
 *
 * @author Parth
 */
public class MultiJudgeSolving {
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st = new StringTokenizer(in.readLine()," ");
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int arr[] = new int[n];
        st = new StringTokenizer(in.readLine()," ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(st.nextToken());
        }
        shuffle(arr);
        Arrays.sort(arr);

        int maxDiff = k;
        int toSolve = 0;
        for(int i=0; i<n; i++){
            if(maxDiff >= (arr[i]%2==0?arr[i]/2:(arr[i]/2+1))){
                if(arr[i]>maxDiff)  maxDiff = arr[i];
            }
            else{
                while(maxDiff < (arr[i]%2==0?arr[i]/2:(arr[i]/2+1))){
                    maxDiff = maxDiff*2;
                }
                toSolve++;
            }
        }
        out.println(toSolve);

        out.close();
    }

    public static void shuffle(int arr[]){
        Random rnd = new Random();
        int len = arr.length;
        for(int i=0; i<len; i++){
            int rindx = i+rnd.nextInt(len-i);
            int tmp = arr[i];
            arr[i] = arr[rindx];
            arr[rindx] = tmp;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/**
 *
 * @author Parth
 */
public class MultiJudgeSolving {
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st = new StringTokenizer(in.readLine()," ");
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int arr[] = new int[n];
        st = new StringTokenizer(in.readLine()," ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(st.nextToken());
        }
        shuffle(arr);
        Arrays.sort(arr);

        int maxDiff = k;
        int toSolve = 0;
        for(int i=0; i<n; i++){
            if(maxDiff >= (arr[i]%2==0?arr[i]/2:(arr[i]/2+1))){
                //if(arr[i]>maxDiff)  maxDiff = arr[i];
            }
            else{
                maxDiff = arr[i];
                toSolve++;
            }
        }
        out.println(toSolve);

        out.close();
    }

    public static void shuffle(int arr[]){
        Random rnd = new Random();
        int len = arr.length;
        for(int i=0; i<len; i++){
            int rindx = i+rnd.nextInt(len-i);
            int tmp = arr[i];
            arr[i] = arr[rindx];
            arr[rindx] = tmp;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/**
 *
 * @author Parth
 */
public class MultiJudgeSolving {
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st = new StringTokenizer(in.readLine()," ");
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int arr[] = new int[n];
        st = new StringTokenizer(in.readLine()," ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(st.nextToken());
        }
        shuffle(arr);
        Arrays.sort(arr);

        int maxDiff = k;
        int toSolve = 0;
        for(int i=0; i<n; i++){
            if(maxDiff >= arr[i]/2){
                if(arr[i]>maxDiff)  maxDiff = arr[i];
            }
            else{
                maxDiff = arr[i];
                toSolve++;
            }
        }
        out.println(toSolve);

        out.close();
    }

    public static void shuffle(int arr[]){
        Random rnd = new Random();
        int len = arr.length;
        for(int i=0; i<len; i++){
            int rindx = i+rnd.nextInt(len-i);
            int tmp = arr[i];
            arr[i] = arr[rindx];
            arr[rindx] = tmp;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/**
 *
 * @author Parth
 */
public class MultiJudgeSolving {
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st = new StringTokenizer(in.readLine()," ");
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int arr[] = new int[n];
        st = new StringTokenizer(in.readLine()," ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(st.nextToken());
        }
        shuffle(arr);
        Arrays.sort(arr);

        int maxDiff = k;
        int toSolve = 0;
        for(int i=0; i<n; i++){
            if(maxDiff >= (arr[i]%2==0?arr[i]/2:(arr[i]/2+1))){
                if(arr[i]>maxDiff)  maxDiff = arr[i];
            }
            else{
                maxDiff = arr[i];
                toSolve++;
            }
        }
        out.println(toSolve);

        out.close();
    }

    public static void shuffle(int arr[]){
        Random rnd = new Random();
        int len = arr.length;
        for(int i=0; i<len; i++){
            int rindx = i+rnd.nextInt(len-i);
            int tmp = arr[i];
            arr[i] = arr[rindx];
            arr[rindx] = tmp;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

/**
 *
 * @author Parth
 */
public class MultiJudgeSolving {
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        StringTokenizer st = new StringTokenizer(in.readLine()," ");
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int arr[] = new int[n];
        st = new StringTokenizer(in.readLine()," ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(st.nextToken());
        }
        shuffle(arr);
        Arrays.sort(arr);

        int maxDiff = k;
        int toSolve = 0;
        for(int i=0; i<n; i++){
            if(2*maxDiff >= arr[i]){
                if(arr[i]>maxDiff)  maxDiff = arr[i];
            }
            else{
                while(2*maxDiff < arr[i]){
                    maxDiff = maxDiff*2;
                    toSolve++;
                }
                if(maxDiff<arr[i])  maxDiff = arr[i];
            }
        }
        out.println(toSolve);

        out.close();
    }

    public static void shuffle(int arr[]){
        Random rnd = new Random();
        int len = arr.length;
        for(int i=0; i<len; i++){
            int rindx = i+rnd.nextInt(len-i);
            int tmp = arr[i];
            arr[i] = arr[rindx];
            arr[rindx] = tmp;
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {
	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), k = sc.nextInt();
		int [] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
		}
		shuffle(a);
		Arrays.sort(a);
		int res = 0;
		for (int i = 0; i < a.length; i++) {
			while((a[i]+1)/2 > k){
				res++;
				k = 2*k;
			}
			k = Math.max(k, a[i]);
		}
		out.println(res);
		out.flush();
		out.close();
	}
	static void shuffle(int[] a)
	{
		int n = a.length, tmp;
		for(int i = 0; i < n; ++i)
		{
			int r = i + (int) (Math.random() * (n - i));
			tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}

	}
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {
	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), k = sc.nextInt(), max = 0;
		int [] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
			max = Math.max(max, a[i]);
		}
		shuffle(a);
		Arrays.sort(a);
		int lo = 0, hi = n-1, ans = n;
		while(lo <= hi){
			int mid = (lo + hi)/2;
			if((a[mid]+1)/2 > k){
				ans = mid;
				hi = mid-1;
			}
			else{
				lo = mid+1;
			}
		}
		int res = 0;
		k = Math.max(k, ans == 0?0:a[ans-1]);
		while(k < (max+1)/2){
			max = (max+1)/2;
			res++;
		}
		out.println(res);
		out.flush();
		out.close();
	}
	static void shuffle(int[] a)
    {
	int n = a.length, tmp;
	for(int i = 0; i < n; ++i)
	{
	    int r = i + (int) (Math.random() * (n - i));
	    tmp = a[i];
	    a[i] = a[r];
	    a[r] = tmp;
	}

    }
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {
	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), k = sc.nextInt();
		int [] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
		}
		shuffle(a);
		Arrays.sort(a);
		int lo = 0, hi = n-1, ans = n;
		while(lo <= hi){
			int mid = (lo + hi)/2;
			if(a[mid] > k*2-1){
				ans = mid;
				hi = mid-1;
			}
			else{
				lo = mid+1;
			}
		}
		int res = 0;
		k = Math.max(k, ans == 0?0:a[ans-1]);
		for (int i = ans; i < a.length; i++) {
			if((a[i]+1)/2 > k)
				res++;
			k = Math.max(a[i], 2*k);
		}
		out.println(res);
		out.flush();
		out.close();
	}
	static void shuffle(int[] a)
    {
	int n = a.length, tmp;
	for(int i = 0; i < n; ++i)
	{
	    int r = i + (int) (Math.random() * (n - i));
	    tmp = a[i];
	    a[i] = a[r];
	    a[r] = tmp;
	}

    }
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {
	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), k = sc.nextInt();
		int [] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
		}
		shuffle(a);
		Arrays.sort(a);
		int lo = 0, hi = n-1, ans = n;
		while(lo <= hi){
			int mid = (lo + hi)/2;
			if(a[mid] > k*2-1){
				ans = mid;
				hi = mid-1;
			}
			else{
				lo = mid+1;
			}
		}
		int res = 0;
		k = Math.max(k, ans == 0?0:a[ans-1]);
		for (int i = ans; i < a.length; i++) {
			while((a[i]+1)/2 > k){
				res++;
				if(k == 1) k = 2;
				else
					k = 2*k-1;
			}
		}
		out.println(res);
		out.flush();
		out.close();
	}
	static void shuffle(int[] a)
	{
		int n = a.length, tmp;
		for(int i = 0; i < n; ++i)
		{
			int r = i + (int) (Math.random() * (n - i));
			tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}

	}
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {
	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), k = sc.nextInt(), max = 0;
		int [] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			max = Math.max(max, sc.nextInt());
		}
		if(max <= 2*k-1)
			out.println(0);
		else out.println(1);
		out.flush();
		out.close();
	}
	static void shuffle(int[] a)
    {
	int n = a.length, tmp;
	for(int i = 0; i < n; ++i)
	{
	    int r = i + (int) (Math.random() * (n - i));
	    tmp = a[i];
	    a[i] = a[r];
	    a[r] = tmp;
	}

    }
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {
	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), k = sc.nextInt();
		int [] a = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
		}
		shuffle(a);
		Arrays.sort(a);
		int lo = 0, hi = n-1, ans = n;
		while(lo <= hi){
			int mid = (lo + hi)/2;
			if(a[mid] > k*2-1){
				ans = mid;
				hi = mid-1;
			}
			else{
				lo = mid+1;
			}
		}
		int res = 0;
		k = Math.max(k, ans == 0?0:a[ans-1]);
		for (int i = ans; i < a.length; i++) {
			if((a[i]+1)/2 > k)
				res++;
			k = a[i];
		}
		out.println(res);
		out.flush();
		out.close();
	}
	static void shuffle(int[] a)
    {
	int n = a.length, tmp;
	for(int i = 0; i < n; ++i)
	{
	    int r = i + (int) (Math.random() * (n - i));
	    tmp = a[i];
	    a[i] = a[r];
	    a[r] = tmp;
	}

    }
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


import java.util.*;
import java.io.*;

public class Main {

    public static char[][] field;

    public static void main(String[] args) throws Exception{

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        String[] input = in.readLine().split("\\s+");
        int n = Integer.parseInt(input[0]);
        int k = Integer.parseInt(input[1]);

        PriorityQueue<Integer> pq = new PriorityQueue<Integer>();

        input = in.readLine().split("\\s+");

        for(int i = 0; i < n; i++){
            pq.add(Integer.parseInt(input[i]));
        }

        int maxSolved = k;
        int canSolveDiff = 2*maxSolved;
        int ans = 0;

        for(int i = 0; i < n; i++){
            int tmp = pq.poll();

            if(tmp > canSolveDiff){
                ans++;
                maxSolved = (int) Math.ceil(tmp/2.0);
                canSolveDiff = 2*maxSolved;
            }
            else if(tmp > maxSolved){
                maxSolved = tmp;
                canSolveDiff = 2*maxSolved;
            }
        }

        out.println(ans);

        in.close();
        out.close();
    }

}


import java.util.*;
import java.io.*;

public class Main {

    public static char[][] field;

    public static void main(String[] args) throws Exception{

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        String[] input = in.readLine().split("\\s+");
        int n = Integer.parseInt(input[0]);
        int k = Integer.parseInt(input[1]);

        PriorityQueue<Integer> pq = new PriorityQueue<Integer>();

        input = in.readLine().split("\\s+");

        for(int i = 0; i < n; i++){
            pq.add(Integer.parseInt(input[i]));
        }

        int maxSolved = k;
        int canSolveDiff = 2*maxSolved;
        int ans = 0;

        for(int i = 0; i < n; i++){
            int tmp = pq.poll();

            if(tmp > canSolveDiff){
                ans++;
            }
            else if(tmp > maxSolved){
                maxSolved = tmp;
                canSolveDiff = 2*maxSolved;
            }
        }

        out.println(ans);

        in.close();
        out.close();
    }

}


import java.util.*;
import java.io.*;

public class Main {

    public static char[][] field;

    public static void main(String[] args) throws Exception{

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        String[] input = in.readLine().split("\\s+");
        int n = Integer.parseInt(input[0]);
        int k = Integer.parseInt(input[1]);

        PriorityQueue<Integer> pq = new PriorityQueue<Integer>();

        input = in.readLine().split("\\s+");

        for(int i = 0; i < n; i++){
            pq.add(Integer.parseInt(input[i]));
        }

        int maxSolved = k;
        int canSolveDiff = 2*maxSolved;
        int ans = 0;

        for(int i = 0; i < n; i++){
            int tmp = pq.poll();

            if(tmp > canSolveDiff){
                ans++;
                maxSolved = canSolveDiff;
                canSolveDiff = 2*maxSolved;
                pq.add(tmp);
            }
            else if(tmp > maxSolved){
                maxSolved = tmp;
                canSolveDiff = 2*maxSolved;
            }
        }

        out.println(ans);

        in.close();
        out.close();
    }

}


import java.util.*;
import java.io.*;

public class Main {

    public static char[][] field;

    public static void main(String[] args) throws Exception{

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        String[] input = in.readLine().split("\\s+");
        int n = Integer.parseInt(input[0]);
        int k = Integer.parseInt(input[1]);

        PriorityQueue<Integer> pq = new PriorityQueue<Integer>();

        input = in.readLine().split("\\s+");

        for(int i = 0; i < n; i++){
            pq.add(Integer.parseInt(input[i]));
        }

        int maxSolved = k;
        int canSolveDiff = 2*maxSolved;
        int ans = 0;

        while(pq.size() > 0){
            int tmp = pq.poll();

            if(tmp > canSolveDiff){
                ans++;
                maxSolved = canSolveDiff;
                canSolveDiff = 2*maxSolved;
                pq.add(tmp);
            }
            else if(tmp > maxSolved){
                maxSolved = tmp;
                canSolveDiff = 2*maxSolved;
            }
        }

        out.println(ans);

        in.close();
        out.close();
    }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Sanket Makani
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader sc, PrintWriter w) {
            int n = sc.nextInt();
            int m = sc.nextInt();

            int arr[] = new int[n];

            for (int i = 0; i < n; i++)
                arr[i] = sc.nextInt();

            Arrays.sort(arr);

            int prev = -1;
            int curr = 0;

            int first = 0;
            while (prev != curr) {
                curr = lowerBound(arr, first == 0 ? 2 * m : 2 * arr[curr]);
                if (curr == -1) {
                    w.println("0");
                    return;
                }

                prev = curr;
            }

            if (curr == n - 1)
                w.println("0");
            else
                w.println("1");
        }

        private int lowerBound(int[] arr, int i) {

            int n = arr.length;

            if (i >= arr[n - 1])
                return -1;

            int curr = 0;

            int l = 0;
            int r = n - 1;

            while (l <= r) {
                int mid = (l + r) >> 1;

                if (arr[mid] > i) {
                    r = mid - 1;
                } else {
                    curr = mid;
                    l = mid + 1;
                }
            }

            return curr;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Sanket Makani
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader sc, PrintWriter w) {
            int n = sc.nextInt();
            int m = sc.nextInt();

            int arr[] = new int[n];

            for (int i = 0; i < n; i++)
                arr[i] = sc.nextInt();

            Arrays.sort(arr);

            int ans = 0;
            int max_till_now = m;
            int curr = 2 * m;

            for (int i = 0; i < n; i++) {
                int j = i;
                while (j < n && arr[j] <= curr) {
                    max_till_now = Math.max(max_till_now, arr[j]);
                    curr = Math.max(curr, 2 * max_till_now);
                    j++;
                }

                if (j >= n)
                    break;

                i = j - 1;
                ans++;
                curr = 2 * curr;
            }
            w.println(ans);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author llamaoo7
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int d = in.nextInt();
            int[] p = new int[n];
            for (int i = 0; i < n; i++) p[i] = in.nextInt();
            Arrays.sort(p);
            int ret = 0;
            for (int i = 0; i < n; i++) {
                while (d < p[i] / 2) {
                    d *= 2;
                    ret++;
                }
            }
            out.print(ret);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author llamaoo7
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int d = in.nextInt();
            int[] p = new int[n];
            for (int i = 0; i < n; i++) p[i] = in.nextInt();
            Arrays.sort(p);
            int ret = 0;
            for (int i = 0; i < n; i++) {
                while (d * 2 < p[i]) {
                    d *= 2;
                    ret++;
                }
                d = Math.max(p[i], d);
            }
            out.print(ret);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author llamaoo7
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int d = in.nextInt();
            int[] p = new int[n];
            for (int i = 0; i < n; i++) p[i] = in.nextInt();
            Arrays.sort(p);
            int ret = 0;
            for (int i = 0; i < n; i++) {
                while (d < p[i] / 2) {
                    d *= 2;
                    ret++;
                }
                d = Math.max(p[i], d);
            }
            out.print(ret);
        }

    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        ManualReader in = getManualReader();
        int n = in.nextInt();
        int k = in.nextInt();

        ArrayList<Integer> difficulties = new ArrayList <Integer> ();
        for (int i = 0; i < n; i++){
            int currentDifficulty = in.nextInt();
            difficulties.add(currentDifficulty);
        }
        Collections.sort(difficulties);

        long maximumSolvedDifficulty = k;
        long maximumPossibleDifficulty = 2 * k;
        int result = 0;

        for(int i = 0; i < n; i++){
            int currentDifficulty = difficulties.get(i);
            if(currentDifficulty < maximumPossibleDifficulty){
                if(currentDifficulty > maximumSolvedDifficulty){
                    maximumSolvedDifficulty = currentDifficulty;
                    maximumPossibleDifficulty = 2 * maximumSolvedDifficulty;
                }
            }else {
                while(maximumPossibleDifficulty < currentDifficulty){
                    maximumSolvedDifficulty = maximumPossibleDifficulty;
                    maximumPossibleDifficulty = 2 * maximumSolvedDifficulty;
                    result ++;
                }
                if(currentDifficulty > maximumSolvedDifficulty){
                    maximumSolvedDifficulty = currentDifficulty;
                    maximumPossibleDifficulty = 2 * maximumSolvedDifficulty;
                }
            }
        }

        System.out.println(result);
    }

    private static ManualReader getManualReader(){
        InputStreamReader inputStream = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(inputStream);
        ManualReader in = new ManualReader(reader);
        return in;
    }

    static class ManualReader{
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public ManualReader(BufferedReader reader){
            this.reader = reader;
            tokenizer = null;
        }

        public String nextLine() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextLine());
        }

        public long nextLong() {
            return Long.parseLong(nextLine());
        }
    }
}


import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        ManualReader in = getManualReader();
        int n = in.nextInt();
        int k = in.nextInt();

        ArrayList<Integer> difficulties = new ArrayList <Integer> ();
        for (int i = 0; i < n; i++){
            int currentDifficulty = in.nextInt();
            difficulties.add(currentDifficulty);
        }
        Collections.sort(difficulties);

        long maximumSolvedDifficulty = k;
        long maximumPossibleDifficulty = 2 * k;
        int result = 0;

        for(int i = 0; i < n; i++){
            int currentDifficulty = difficulties.get(i);
            if(currentDifficulty < maximumPossibleDifficulty){
                if(currentDifficulty > maximumSolvedDifficulty){
                    maximumSolvedDifficulty = currentDifficulty;
                    maximumPossibleDifficulty = 2 * maximumSolvedDifficulty;
                }
            }else {
                while(maximumPossibleDifficulty < currentDifficulty){
                    maximumSolvedDifficulty = maximumPossibleDifficulty;
                    maximumPossibleDifficulty = 2 * maximumSolvedDifficulty;
                    result ++;
                }
            }
        }

        System.out.println(result);
    }

    private static ManualReader getManualReader(){
        InputStreamReader inputStream = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(inputStream);
        ManualReader in = new ManualReader(reader);
        return in;
    }

    static class ManualReader{
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public ManualReader(BufferedReader reader){
            this.reader = reader;
            tokenizer = null;
        }

        public String nextLine() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextLine());
        }

        public long nextLong() {
            return Long.parseLong(nextLine());
        }
    }
}