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 mwistrom
 */
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 k = in.nextInt();

            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }

            Arrays.sort(a);

            int max = 2 * k;

            int count = 0;
            for (int i = 0; i < n; i++) {
                if (a[i] <= max) {
                    max = Math.max(max, 2 * a[i]);
                    continue;
                }
                while (max < a[i]) {
                    count++;
                    max = 2 * max;
                }

            }
            out.println(count);

        }

    }
}


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 mwistrom
 */
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 k = in.nextInt();

            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }

            Arrays.sort(a);

            int max = 2 * k;

            int count = 0;
            for (int i = 0; i < n; i++) {
                if (a[i] <= max) {
                    max = Math.max(max, 2 * a[i]);
                    continue;
                }
                count++;
                max = 2 * max;

            }
            out.println(count);

        }

    }
}


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 mwistrom
 */
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 k = in.nextInt();

            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }

            Arrays.sort(a);

            int max = 2 * k;

            int count = 0;
            for (int i = 0; i < n; i++) {
                while (max < a[i]) {
                    count++;
                    max = 2 * max;
                }
                if (a[i] <= max) {
                    max = Math.max(max, 2 * a[i]);
                    continue;
                }

            }
            out.println(count);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int last = as.get(as.size() - 1);
            int cnt = 0;
            int c = Collections.binarySearch(as, 2 * k);
            if (c < 0) {
                c = -(c + 1) - 1;
            }
            k = Math.max(k, as.get(c >= as.size() ? as.size() - 1 : c));
            while (k * 2 < last) {
                k = k * 2;
                cnt++;
            }
            out.write(Integer.toString(cnt));

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int last = as.get(as.size() - 1);
            int cnt = 0;
            int c = Collections.binarySearch(as, 2 * k);
            c = -(c + 1) - 1;
            k = Math.max(k, as.get(c >= as.size() ? as.size() - 1 : c));
            while (k * 2 < last) {
                k = k * 2;
                cnt++;
            }
            out.write(Integer.toString(cnt));

        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                if (as.get(i) <= k * 2) {
                    k = Math.max(k, as.get(i));
                } else {
                    while (k * 2 < as.get(i)) {
                        k = k * 2;
                        cnt++;
                    }
                    k = as.get(i);
                }
            }
            out.write(Integer.toString(cnt));

        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int last = as.get(as.size() - 1);
            int cnt = 0;
            while (k * 2 < last) {
                k = k * 2;
                cnt++;
            }
            out.write(Integer.toString(cnt));

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int last = as.get(as.size() - 1);
            int cnt = 0;
            int c = Collections.binarySearch(as, 2 * k);
            c = -c;
            k = Math.max(k, as.get(c >= as.size() ? as.size() - 1 : c));
            while (k <= last) {
                k = k * 2;
                cnt++;
            }
            out.write(Integer.toString(cnt));

        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int last = as.get(as.size() - 1);
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                if (as.get(i) <= k * 2) {
                    k = Math.max(k, as.get(i) / 2);
                } else {
                    while (k * 2 < as.get(i)) {
                        k = k * 2;
                        cnt++;
                    }
                }
            }
            out.write(Integer.toString(cnt));

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author shanky_ty
 */
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 k = in.nextInt();
            ArrayList<Integer> as = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                as.add(in.nextInt());
            }
            as.sort(Integer::compare);
            int last = as.get(as.size() - 1);
            int cnt = 0;
            int c = Collections.binarySearch(as, 2 * k);
            if (c < 0) {
                c = -(c + 1) - 1;
            }
            if (c >= 0) {
                k = Math.max(k, as.get(c >= as.size() ? as.size() - 1 : c));
            }
            while (k * 2 < last) {
                k = k * 2;
                cnt++;
            }
            out.write(Integer.toString(cnt));

        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            while (i < n && arr[i] <= k * 2) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 1;
            if (i < n)
                k = arr[i];
            while (i < n) {
                int j = i;
                while (j < n && arr[j] <= k * 2) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                if (j < n) {
                    k = arr[j];
                    cnt++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            boolean[] vis = new boolean[n];
            i = 0;
            while (i < n && arr[i] <= k * 2) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            while (i < n) {
                if (k * 2 < arr[i]) {
                    cnt++;
                    k = arr[i];
                }
                int j = i;
                while (j < n && arr[j] <= k * 2) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            boolean[] vis = new boolean[n];
            i = 0;
            long p = k;
            while (i < n && arr[i] <= k * 2) {
                p = Math.max(p, arr[i]);
                i++;
            }
            k = p;
            int cnt = 0;
            while (i < n) {
                if (k * 2 < arr[i]) {
                    cnt++;
                    k = arr[i];
                }
                int j = i;
                while (j < n && arr[j] <= k * 2)
                    j++;
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            while (i < n && arr[i] / 2 <= k) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            while (i < n) {
                if (arr[i] / 2 > k) {
                    cnt++;
                    k = arr[i];
                }
                int j = i;
                while (j < n && arr[j] / 2 <= k) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            while (i < n && arr[i] <= k * 2) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            if (i < n) {
                k = arr[i];
                cnt++;
            }
            while (i < n) {
                int j = i;
                while (j < n && arr[j] <= k * 2) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                if (j < n) {
                    k = arr[j];
                    cnt++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            int cnt = 0;
            for (long d : arr) {
                while (d > k * 2) {
                    k *= 2;
                    cnt++;
                }
                k = Math.max(k, d);
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            while (i < n && arr[i] / 2 <= k) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            while (i < n) {
                if (arr[i] > k * 2) {
                    cnt++;
                    k = arr[i];
                }
                int j = i;
                while (j < n && arr[j] / 2 <= k) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            boolean[] vis = new boolean[n];
            i = 0;
            while (i < n && arr[i] <= k * 2)
                i++;
            int cnt = 0;
            while (i < n) {
                int j = i;
                long last = -1;
                while (j < n) {
                    if (arr[j] <= k * 2) {
                        last = arr[j];
                        j++;
                    } else
                        break;
                }
                if (i == j) {
                    cnt++;
                    i = j + 1;
                    k = arr[j];
                } else {
                    k = last;
                    i = j;
                }
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            boolean[] vis = new boolean[n];
            i = 0;
            while (i < n && arr[i] <= k * 2) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            while (i < n) {
                if (k * 2 < arr[i]) {
                    cnt++;
                    k = arr[i];
                }
                int j = i;
                while (j < n && arr[j] <= k * 2)
                    j++;
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            while (i < n && arr[i] <= k * 2) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            while (i < n) {
                int j = i;
                while (j < n && arr[j] <= k * 2) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                if (j < n) {
                    k = arr[j];
                    cnt++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
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);
        CMultiJudgeSolving solver = new CMultiJudgeSolving();
        solver.solve(1, in, out);
        out.close();
    }

    static class CMultiJudgeSolving {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni();
            long k = nl();
            long[] arr = new long[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = nl();
            Arrays.sort(arr);
            i = 0;
            while (i < n && arr[i] <= k * 2) {
                k = Math.max(k, arr[i]);
                i++;
            }
            int cnt = 0;
            while (i < n) {
                if (arr[i] > k * 2) {
                    cnt++;
                    k = arr[i];
                }
                int j = i;
                while (j < n && arr[j] <= k * 2) {
                    k = Math.max(k, arr[j]);
                    j++;
                }
                i = j;
            }
            pn(cnt);

        }

        int ni() {
            return in.nextInt();
        }

        long nl() {
            return in.nextLong();
        }

        void pn(long zx) {
            out.println(zx);
        }

    }

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

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

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


import java.util.Arrays;
import java.util.Scanner;

public class MultiJudge {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr = new int[n];
		for(int i=0; i<n;i++)arr[i] = input.nextInt();
		Arrays.sort(arr);
		int counter=0;
		int i=0;
		while(i<n && arr[i]<k)i++;
		//System.out.println(i);
		arr[i-1] = Math.max(arr[i-1],k);
		int j=i;
		//System.out.println(j +" "+ arr[i-1]);
		//System.out.println(counter);
		for( i=j; i<n;i++){
			if(arr[i]>2*arr[i-1]){
				int z = (int)Math.ceil(arr[i]*1.0/arr[i-1]);
			    System.out.println(z +" "+i);
				counter+=(log2n(z));

			}
		}
		System.out.println(counter);

	}

	private static int log2n(int n){
		return (n > 1)? 1 + log2n(n/2): 0;
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class MultiJudgeSolving {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr =new int[n];
		//System.out.println(log(18.0/8.0));
		int counter=0;
		for(int i=0;i<n;i++)arr[i] = input.nextInt();
	    Arrays.sort(arr);
		int d = arr[n-1];
	     int i = n-1;
		while(i-1>=0 && d>2*k){
			if(arr[i]>2*arr[i-1]){
				counter+=(log(arr[i]*1.0/Math.max(k,arr[i-1])));
			}
			//System.out.println(counter+" "+i);
			i--;
			d = arr[i];
		}
		System.out.println(counter);

	}

	static int log(double n){
		return (int)Math.ceil(Math.log(n)/Math.log(2))-1;
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class MultiJudge {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr = new int[n];
		for(int i=0; i<n;i++)arr[i] = input.nextInt();
		Arrays.sort(arr);
		int counter=0;
		int i=0;
		while(i<n && arr[i]<k)i++;
		//System.out.println(i);
		arr[i-1] = Math.max(arr[i-1],k);
		int j=i;
		//System.out.println(j +" "+ arr[i-1]);
		//System.out.println(counter);
		for( i=j; i<n;i++){
			if(arr[i]>2*arr[i-1]){
				int z = (int)Math.ceil(arr[i]*1.0/arr[i-1]);
			  //  System.out.println(z +" "+i);
				counter+=(log2n(z));

			}
		}
		System.out.println(counter);

	}

	private static int log2n(int n){
		return (n > 1)? 1 + log2n(n/2): 0;
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class MultiJudge {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr = new int[n];
		for(int i=0; i<n;i++)arr[i] = input.nextInt();
		Arrays.sort(arr);
		int counter=0;
		int i=0;
		while(i<n && arr[i]<k)i++;
		//System.out.println(i);
		if(i>0)arr[i-1] = Math.max(arr[i-1],k);
		int j=i;
		//System.out.println(j +" "+ arr[i-1]);
		//System.out.println(counter);
		for( i=Math.max(j,1); i<n;i++){
			if(arr[i]>2*arr[i-1]){
				int z = (int)Math.ceil(arr[i]*1.0/arr[i-1]);
			  //  System.out.println(z +" "+i);
				counter+=(log2n(z));

			}
		}
		System.out.println(counter);

	}

	private static int log2n(int n){
		return (n > 1)? 1 + log2n(n/2): 0;
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class MultiJudgeSolving {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr =new int[n];
		//System.out.println(log(18.0/8.0));
		int counter=0;
		for(int i=0;i<n;i++)arr[i] = input.nextInt();
	    Arrays.sort(arr);
	    if(n==1){
	    	if(2*k>=arr[0]){
	    		System.out.println(0);

	    	}
	    	else
	    		System.out.println(1);
	    	return;
	    }
		int d = arr[n-1];
	     int i = n-1;
		while(i-1>=0 && d>2*k){
			if(arr[i]>2*arr[i-1]){
				counter+=(log(arr[i]*1.0/Math.max(k,arr[i-1])));
			}
			//System.out.println(counter+" "+i);
			i--;
			d = arr[i];
		}
		System.out.println(counter);

	}

	static int log(double n){
		return (int)Math.ceil(Math.log(n)/Math.log(2))-1;
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class MultiJudge {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int res = 0;
		int[] arr = new int[n];
		for(int i=0; i<n;i++)arr[i] = input.nextInt();
		Arrays.sort(arr);
		for(int i=0;i<n;i++){
			while(arr[i]>2*k){
				k  =2*k;
				res++;
			}
			k = Math.max(k,arr[i]);
		}
		System.out.println(res);

	}

}


//package codeforces;

import java.util.Scanner;

/**
 * Created by nitin.s on 21/07/17.
 */
public class MultiJudgeSolving {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int maxx = Integer.MIN_VALUE;
        for(int i = 0; i < n; ++i) {
            maxx = Math.max(maxx, in.nextInt());
        }
        if(2 * k >= maxx) {
            System.out.println(0);
        } else {
            System.out.println(1);
        }
    }
}


//package codeforces;

import java.util.Arrays;
import java.util.Scanner;

/**
 * Created by nitin.s on 21/07/17.
 */
public class MultiJudgeSolving {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; ++i) arr[i] = in.nextInt();
        Arrays.sort(arr);
        int i = 0;
        int answer = 0;
        long newK = 1L * k;
        while(i < n) {
            if(2 * newK < arr[i]) {
                while(2 * newK < arr[i]) {
                    newK = newK * 2;
                    ++answer;
                }
            }
            newK = Math.max(newK, arr[i]);
            ++i;
        }
        System.out.println(answer);
    }
}


//package codeforces;

import java.util.Arrays;
import java.util.Scanner;

/**
 * Created by nitin.s on 21/07/17.
 */
public class MultiJudgeSolving {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; ++i) arr[i] = in.nextInt();
        Arrays.sort(arr);
        int i = 0;
        int answer = 0;
        long newK = 1L * k;
        while(i < n) {
            if(2 * newK < arr[i]) {
                while(2 * newK < arr[i]) {
                    newK = newK * 2;
                    ++answer;
                }
            }
            ++i;
        }
        System.out.println(answer);
    }
}


import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class Reader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        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 String s(){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 long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long 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 int i(){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 double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = i();}return ret;}
    }

           //       |----|       /\      |    |   -----   |
           //       |   /       /  \     |    |     |     |
           //       |--/       /----\    |----|     |     |
           //       |   \     /      \   |    |     |     |
           //       |    \   /        \  |    |   -----   -------

    static PrintWriter out;

    public static void main(String[] args)throws IOException
    {
        Reader sc=new Reader();
        out=new PrintWriter(System.out);
        int n=sc.i();
        int k=sc.i();
        long arr[]=new long[n];
        for(int i=0;i<n;i++)arr[i]=sc.l();
        int low=0;
        int high=40;
        while(low<high)
        {
            int mid=(low+high)/2;
            long maxsolve=(long)k*(long)Math.pow(2,mid);
            int flag=0;
            for(int i=0;i<n;i++)
            if(arr[i]>2*maxsolve)flag=1;
            if(flag==1)
            low=mid+1;
            else
            high=mid;
        }
        out.println(low);
        out.flush();
    }
}


import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class Reader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        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 String s(){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 long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long 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 int i(){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 double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = i();}return ret;}
    }

           //       |----|       /\      |    |   -----   |
           //       |   /       /  \     |    |     |     |
           //       |--/       /----\    |----|     |     |
           //       |   \     /      \   |    |     |     |
           //       |    \   /        \  |    |   -----   -------

    static PrintWriter out;

    public static void main(String[] args)throws IOException
    {
        Reader sc=new Reader();
        out=new PrintWriter(System.out);
        int n=sc.i();
        long k=sc.l();
        long arr[]=new long[n];
        for(int i=0;i<n;i++)arr[i]=sc.l();
        Arrays.sort(arr);
        for(int mid=0;;mid++)
        {
            long maxsolve=(long)k*(long)Math.pow(2,mid);
            int flag=0;
            for(int i=0;i<n;i++)
                if(arr[i]>2*maxsolve)flag=1;
                else maxsolve=Math.max(maxsolve,arr[i]);
            if(flag==0)
            {
                System.out.println(mid);
                System.exit(0);
            }
        }
        //out.flush();
    }
}


import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class Reader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        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 String s(){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 long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long 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 int i(){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 double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = i();}return ret;}
    }

           //       |----|       /\      |    |   -----   |
           //       |   /       /  \     |    |     |     |
           //       |--/       /----\    |----|     |     |
           //       |   \     /      \   |    |     |     |
           //       |    \   /        \  |    |   -----   -------

    static PrintWriter out;

    public static void main(String[] args)throws IOException
    {
        Reader sc=new Reader();
        out=new PrintWriter(System.out);
        int n=sc.i();
        long k=sc.l();
        long arr[]=new long[n];
        for(int i=0;i<n;i++)arr[i]=sc.l();
        Arrays.sort(arr);
        long maxsolve=k;
        for(int mid=0;;mid++)
        {
            int flag=0;
            for(int i=0;i<n;i++)
                if(arr[i]>2*maxsolve)flag=1;
                else maxsolve=Math.max(maxsolve,arr[i]);
            if(flag==0)
            {
                System.out.println(mid);
                System.exit(0);
            }
            maxsolve=(long)maxsolve*2;
        }
        //out.flush();
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class C825 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int n = scanner.nextInt();
			int k = scanner.nextInt();
			int [] difficulty = new int [n];
			for (int i = 0; i < difficulty.length; i++) {
				difficulty[i] = scanner.nextInt();
			}
			Arrays.sort(difficulty);
			int sum = 0;
			for (int i = 0; i < difficulty.length; i++) {
				if (k*2 >= difficulty[i]) {
					k = Math.max(k, difficulty[i]);
				}else {
					sum ++;
					k *= 2;
					i --;
				}
			}
			System.out.println(sum);
		}
	}

}


import java.util.Arrays;
import java.util.Scanner;

public class C825 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int n = scanner.nextInt();
			int k = scanner.nextInt();
			int [] difficulty = new int [n];
			for (int i = 0; i < difficulty.length; i++) {
				difficulty[i] = scanner.nextInt();
			}
			Arrays.sort(difficulty);
			int sum = 1;
			for (int i = 0; i < difficulty.length; i++) {
				if (k*2 >= difficulty[i]) {
					k = Math.max(k, difficulty[i]);
				}else {
					sum ++;
					k *= 2;
					i --;
				}
			}
			System.out.println(sum);
		}
	}

}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int [] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        System.out.println(binaryToInt(n,k,arr));
    }

    static int binaryToInt(int n , int k, int[] arr){
        int count = 0;
        Arrays.sort(arr);
        for (int i = 0; i < n; i++) {
            if(arr[i] > k){
                count++;
                k = arr[i] / 2;
            }
        }
        return count;
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int [] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        System.out.println(binaryToInt(n,k,arr));
    }

    static int binaryToInt(int n , int k, int[] arr){
        int count = 0;
        Arrays.sort(arr);
        for (int i = 0; i < n; i++) {
            while (k * 2 < arr[i]){
                count++;
                k = k * 2;
            }
            k = Math.max(k,arr[i]);
        }
        return count;
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int [] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        System.out.println(binaryToInt(n,k,arr));
    }

    static int binaryToInt(int n , int k, int[] arr){
        int count = 0;
        int d = k * 2;
       Arrays.sort(arr);
        for (int i = 0; i < n; i++) {
            if(arr[i] > k){
                count++;
                if( d < arr[i]/2){
                    count++;
                    d = d * 2;
                }
            }
        }
        return count;
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int [] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        System.out.println(binaryToInt(n,k,arr));
    }

    static int binaryToInt(int n , int k, int[] arr){
        int count = 0;
        Arrays.sort(arr);
        for (int i = 0; i < n; i++) {
            if(arr[i] > k){
                count++;
                k = k + arr[i] / 2;
            }
        }
        return count;
    }
}


import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class _3 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long k=sc.nextLong();
		long count=0;
		long[] arr=new long[n];
		for(int i=0;i<n;i++)
		{
			arr[i]=sc.nextInt();
		}
		Arrays.sort(arr);
		for(long t:arr)
		{
			if(t>k*2)
			{
				for(long j=t;j>k*2;j=(long) Math.ceil(j/2.0))
				{
					count++;
				}
			}
			if(t>k)
				k=t;
		}
		System.out.println(count);

	}

}


import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class _3 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long k=sc.nextLong();
		long count=0;
		long[] arr=new long[n];
		for(int i=0;i<n;i++)
		{
			arr[i]=sc.nextInt();
		}
		Arrays.sort(arr);
		for(long t:arr)
		{
			if(t>k*2)
			{
				if(t%2!=0)
					t=t+1;
				for(long j=t;j>k*2;j=j/2)
				{
					count++;
					if(j%2!=0)
						j=j+1;
				}
			}
			if(t>k)
				k=t;
		}
		System.out.println(count);

	}

}


import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class _3 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long k=sc.nextLong();
		long count=0;
		long[] arr=new long[n];
		for(int i=0;i<n;i++)
		{
			arr[i]=sc.nextInt();
		}
		Arrays.sort(arr);
		for(long t:arr)
		{
			if(t>k*2)
			{
				for(long j=t;j>k*2;j=j/2)
				{
					count++;
				}
			}
			if(t>k)
				k=t;
		}
		System.out.println(count);

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Scanner;

public class _3 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long k=sc.nextLong();
		long count=0;
		for(int i=0;i<n;i++)
		{
			long t=sc.nextLong();
			if(t>k*2)
			{
				k=t;
				count++;
			}
		}
		System.out.println(count);

	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Scanner;

public class _3 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long k=sc.nextLong();
		long count=0;
		for(int i=0;i<n;i++)
		{
			long t=sc.nextLong();
			if(t>k*2)
			{
				for(long j=t;j>k*2;j=j/2)
				{
					count++;
				}
				k=t;
			}
		}
		System.out.println(count);

	}

}


import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * 作者：张宇翔
 * 创建日期：2017年7月16日 下午11:04:25
 * 描述：
 */
public class Main {

	private static final int Max = (int) (1e4 + 10);
	private static int n,k;
	private static int []a;
	public static void main(String[] args) {
		InitData();
		GetAns();
	}
	private static void InitData() {
		Scanner cin = new Scanner(System.in);
		a=new int[Max];
		n=cin.nextInt();
		k=cin.nextInt();
		for(int i=0;i<n;i++){
			a[i]=cin.nextInt();
		}
	};

	private static void GetAns() {
		Arrays.sort(a,0,n);
		int ans=0;
		int MAX=k;
		for(int i=0;i<n;i++){
			int x=a[i]%2==0?(a[i]/2):(a[i]/2+1);
			if(MAX>=x){
				MAX=Math.max(MAX, a[i]);
			}else{
				System.out.println(n-i);
				return;
			}
		}
		System.out.println(0);
	};
}


import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * 作者：张宇翔
 * 创建日期：2017年7月16日 下午11:04:25
 * 描述：
 */
public class Main {

	private static final int Max = (int) (1e4 + 10);
	private static int n,k;
	private static int []a;
	public static void main(String[] args) {
		InitData();
		GetAns();
	}
	private static void InitData() {
		Scanner cin = new Scanner(System.in);
		a=new int[Max];
		n=cin.nextInt();
		k=cin.nextInt();
		for(int i=0;i<n;i++){
			a[i]=cin.nextInt();
		}
	};

	private static void GetAns() {
		Arrays.sort(a,0,n);
		int ans=0;
		int MAX=k;
		for(int i=0;i<n;i++){
			int x=a[i]%2==0?(a[i]/2):(a[i]/2+1);
			if(MAX>=x){
				MAX=Math.max(MAX, a[i]);
			}else{
				ans++;
				MAX=a[i];
			}
		}
		System.out.println(ans);
	};

}


import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * 作者：张宇翔
 * 创建日期：2017年7月16日 下午11:04:25
 * 描述：
 */
public class Main {

	private static final int Max = (int) (1e4 + 10);
	private static int n,k;
	private static int []a;
	public static void main(String[] args) {
		InitData();
		GetAns();
	}
	private static void InitData() {
		Scanner cin = new Scanner(System.in);
		a=new int[Max];
		n=cin.nextInt();
		k=cin.nextInt();
		for(int i=0;i<n;i++){
			a[i]=cin.nextInt();
		}
	};

	private static void GetAns() {
		Arrays.sort(a,0,n);
		int ans=0;
		int MAX=k;
		for(int i=0;i<n;i++){
			int x=a[i]%2==0?(a[i]/2):(a[i]/2+1);
			if(MAX>=x){
				MAX=Math.max(MAX, a[i]);
			}else{
				ans++;
				MAX=x;
			}
		}
		System.out.println(ans);
	};
}


import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * 作者：张宇翔
 * 创建日期：2017年7月16日 下午11:04:25
 * 描述：
 */
public class Main {

	private static final int Max = (int) (1e4 + 10);
	private static int n,k;
	private static int []a;
	public static void main(String[] args) {
		InitData();
		GetAns();
	}
	private static void InitData() {
		Scanner cin = new Scanner(System.in);
		a=new int[Max];
		n=cin.nextInt();
		k=cin.nextInt();
		for(int i=0;i<n;i++){
			a[i]=cin.nextInt();
		}
	};

	private static void GetAns() {
		Arrays.sort(a,0,n);
		int ans=0;
		int MAX=k;
		for(int i=0;i<n;i++){
			int x=a[i]%2==0?(a[i]/2):(a[i]/2+1);
			if(MAX>=x){
				MAX=Math.max(MAX, a[i]);
			}else{
				int temp=x;
				while(MAX<temp){
					ans++;
					temp=temp%2==0?(temp/2):(temp/2+1);
				}
				MAX=a[i];
			}
		}
		System.out.println(ans);
	};
}


	import java.io*;

	import java.util.*;

	   public  class Main {

		public static void main(String[] args) {

          int n = sc.nextInt();
          int k = sc.nextInt();

          int arr[] = new int[n];

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

          Arrays.sort(arr);

          int max=arr[n-1];
          int req = max/2;
          int ans=0;
          int curr=2*k;
          for(int i=0;i<n;i++)
          {
               int ai = arr[i];
               if(ai<=curr)
               {

                    curr=Math.max(curr,2*ai);

               }
               else
               {
                   //pw.println("f");
                   curr=2*curr;
                   ans++;
               }

          }
          pw.println(ans+" "+curr);

			    pw.close();

		}

		/*public static int ispr(int n)
	    	{
	    	//boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) {
	            Prime[i] = true;
	        }

	        // mark non-primes <= n using Sieve of Eratosthenes
	        for (int factor = 2; factor*factor <= n; factor++) {

	            // if factor is prime, then mark multiples of factor as nonprime
	            // suffices to consider mutiples factor, factor+1, ...,  n/factor
	            if (Prime[factor]) {
	                for (int j = factor; factor*j <= n; j++) {
	                    Prime[factor*j] = false;
	                }
	            }
	        }
	        // count primes

	        /*int primes = 0;
	        for (int i = 2; i <= n; i++) {
	            if (isPrime	[i])System.out.println(i);

	        }*/
		// System.out.println("The number of primes <= " + n + " is " + primes);
		//return 0;
		// if(isPrime[n]==true)return 1; else return 0;

		//}

		public static long fact(long x)
		{
			if(x==0)return 1;
			else return x*fact(x-1);
		}

		public static long exp(long x, long n, long M)
		{

			if(n==0) return 1;

			else if(n%2==0) return exp((x*x)%M,n/2,M);
			else return (x*exp((x*x)%M,(n-1)/2,M))%M;

		}

		//fi

		static long fib(long n)
		{
			long F[][] = new long[][]{{1,1},{1,0}};
			if (n == 0)
				return 0;
			power(F, n-1);

			return F[0][0];
		}

		static int mod=1000000007;

		static void multiply(long F[][], long M[][])
		{
			long x =  (((F[0][0]%mod)*(M[0][0]%mod))%mod + ((F[0][1]%mod)*(M[1][0]%mod))%mod)%mod;
			long y =  (((F[0][0]%mod)*(M[0][1]%mod))%mod + ((F[0][1]%mod)*(M[1][1]%mod))%mod)%mod;
			long z =  (((F[1][0]%mod)*(M[0][0]%mod))%mod + ((F[1][1]%mod)*(M[1][0]%mod))%mod)%mod;
			long w =  (((F[1][0]%mod)*(M[0][1]%mod))%mod + ((F[1][1]%mod)*(M[1][1]%mod))%mod)%mod;

			F[0][0] = x;
			F[0][1] = y;
			F[1][0] = z;
			F[1][1] = w;
		}

		/* Optimized version of power() in method 4 */
		static void power(long F[][], long n)
		{
			if( n == 0 || n == 1)
				return;
			long M[][] = new long[][]{{1,1},{1,0}};

			power(F, n/2);
			multiply(F, F);

			if (n%2 != 0)
				multiply(F, M);
		}

		public static int gcd(int a, int b)
		{
			if(b==0)
				return a;
			else return gcd(b,a%b);
		}

		static  class MyScanner {

			BufferedReader br;
			StringTokenizer st;

			public MyScanner() {
				br = new BufferedReader(new InputStreamReader(System.in));
			}

			String next() {
				while (st == null || !st.hasMoreElements()) {
					try {
						st = new StringTokenizer(br.readLine());
					} catch (IOException e) {
						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) {
					e.printStackTrace();
				}
				return str;
			}

		}

		static MyScanner sc = new  MyScanner();
		static PrintWriter pw = new PrintWriter(System.out, true);

		static void printPath(int parent[], int j)
		{
		    // Base Case : If j is source
		    if (parent[j]==-1)
		        {pw.print(j+" ");return;}

		    printPath(parent, parent[j]);

		    pw.print(j+" ");
		}

		//Main begins here :)
	/*
		public static class Pair{
		    int a;
		    int b;
		    Pair(int p,int q){
		        a=p;
		        b=q;
		    }
		    public boolean equals(Object o) {
		        if (o instanceof Pair) {
		            Pair p = (Pair)o;
		            return p.a == a && p.b == b;
		        }
		        return false;
		    }
		    public int hashCode() {
		        return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
		    }
		}
		*/

		public static int max1(String st, int k)
		{
			int n1=0;
			int max=Integer.MIN_VALUE;
			int n = st.length();
			if(n==1)
			{
				if(st.charAt(0)=='1')return 1;
				else return 0;
			}

			for(int i=1;i<=k;i++)
			{
				int chp=i-1;

				if(st.charAt(chp)=='1')n1++;

			}
			max=Math.max(max, n1);
		//	if(k>=n)return max;
			int slides=n-k;
			int ptr1=0, ptr2=k-1;

			for(int i=1;i<=slides;i++)
			{
				//pw.println(st.substring(ptr1+i, ptr2+i+1));
				ptr1++; ptr2++;
				if(st.charAt(ptr1-1)=='1')n1--;
				if(st.charAt(ptr2)=='1')n1++;
				//pw.println("m1- "+n1);pw

				if(n1>max)max=n1;
				if(max==k){return k;}
			}

			return max;

		}

		public static String shift(String A)
		{
			char lc = A.charAt(A.length()-1);
			return lc+A.substring(0,A.length()-1);

		}

		static  class Point
		{
			long x,y;

			public Point(long a, long b)
			{
				x=a;
				y=b;
			}

			public int compareTo(Point o) {
				// TODO Auto-generated method stub
				return Long.compare(this.x, o.x);

			}

		}

		static class compx implements Comparator<Point>
		{
			public int compare(Point a, Point b)
			{

				if(a.x>b.x)return 1;
				if(a.x<b.x) return -1;

				return 0;
			}
		}

		static class compy implements Comparator<Point>
		{
			public int compare(Point a, Point b)
			{

				if(a.y>b.y)return 1;
				if(a.y<b.y) return -1;

				return 0;
			}
		}

		public static int lucky(long y)
		{

			long d = y;
			int flg=0;
			//long nd = (long)Math.floor(Math.log10((double)y));
			//pw.println(nd);
			for(;d>=1;d=d/10)
			{
				long dg = d%10;
				if(dg!=0)flg++;
				if(flg==2)return 0;

			}
			return 1;

		}

		public static int diff(Time n, Time k)
		{

			int hn=n.h,mn=n.m,sn=n.s;
			int hk=k.h,mk=k.m,sk=k.s;

			int tc=0,cs=0,cm=0,ch=0;
			if(sk>sn)
			{
				int o1 = sk-sn;
				int o2 = sn+60-sk;

				if(o1>o2)
				{
					cs=o2;
					mn--;
				}
				if(o2>o1)
				{
					cs=o1;
				}
				if(o1==o2)
				{

					int min1 = Math.min(Math.abs(mk-mn), 60 - Math.abs(mk-mn));
					int mn2 = mn-1;
					int min2  = Math.min(Math.abs(mk-mn2), 60 - Math.abs(mk-mn2));
					if(min2<min1)
					{
						cs=o2;
						mn--;
					}
					else
					{
						cs=o1;
					}

				}
			}

			if(sk<sn)
			{
				int o1 = sn-sk;
				int o2 = sk+60-sn;

				if(o1>o2)
				{
					cs=o2;
					mn++;
				}
				if(o2>o1)
				{
					cs=o1;
				}
				if(o1==o2)
				{

					int min1 = Math.min(Math.abs(mk-mn), 60 - Math.abs(mk-mn));
					int mn2 = mn+1;
					int min2  = Math.min(Math.abs(mk-mn2), 60 - Math.abs(mk-mn2));
					if(min2<min1)
					{
						cs=o2;
						mn++;
					}
					else
					{
						cs=o1;
					}

				}
			}

			if(mk>mn)
			{
				int o1 = mk-mn;
				int o2 = mn+60-mk;

				if(o1>o2)
				{
					cm=o2;
					hn--;
				}
				if(o2>o1)
				{
					cm=o1;
				}
				if(o1==o2)
				{
					int min1 = Math.min(Math.abs(hk-hn), 24 - Math.abs(hk-hn));
					int hn2 = hn-1;
					int min2  = Math.min(Math.abs(hk-hn2), 24 - Math.abs(hk-hn2));
					if(min2<min1)
					{
						cm=o2;
						hn--;
					}
					else
					{
						cm=o1;
					}
				}
			}

			if(mk<mn)
			{
				int o1 = mn-mk;
				int o2 = mk+60-mn;

				if(o1>o2)
				{
					cm=o2;
					hn++;
				}
				if(o2>o1)
				{
					cm=o1;
				}
				if(o1==o2)
				{
					int min1 = Math.min(Math.abs(hk-hn), 24 - Math.abs(hk-hn));
					int hn2 = hn+1;
					int min2  = Math.min(Math.abs(hk-hn2), 24 - Math.abs(hk-hn2));
					if(min2<min1)
					{
						cm=o2;
						hn++;
					}
					else
					{
						cm=o1;
					}
				}
			}

			ch = Math.min(Math.abs(hk-hn), 24 - Math.abs(hk-hn));
			tc=cs+cm+ch;
			return tc;

			//return 3;
		}

		public static class Time
		{
			int h,m,s;

			public Time(int x, int y, int z)
			{
				h=x; m=y; s=z;

			}

		}

		static class Pair
		{
		    int x;
		    int y;

		    public Pair(int a , int b)
		    {
		        x=a;
		        y=b;
		    }

		}

		static class comp implements Comparator<Pair>
		{

		    @Override

		    public int compare(Pair a ,Pair b)
		    {
		        if(b.x>a.x)return -1;
		        if(b.x<a.x)return 1;
		        return 0;

		    }

		}
		static class compv implements Comparator<Vouch>
		{

		    @Override

		    public int compare(Vouch a ,Vouch b)
		    {
		        if(b.c>a.c)return -1;
		        if(b.c<a.c)return 1;
		        return 0;

		    }

		}

		static class Vouch
		{
		   int l,r, c;

		    public Vouch(int a ,int b, int ci)
		    {
		        l=a;
		        r=b;
		        c=ci;

		    }

		}

		public static int strStr(final String haystack, final String needle) {

			if(needle.equals("")) return -1;
		    if(haystack.equals("")&&needle.equals(""))return -1;

		    String temp="";

		    int hl = haystack.length();
		    int nl = needle.length();
		    if(nl>hl) return -1;
		    int ret=-1;
	        String wind = haystack.substring(0,nl);
	        pw.println(wind);
	        if(wind.equals(needle)) return 0;

	        for(int i=1;i<hl-nl;i++)
	        {
	            wind = wind.substring(1, wind.length());

	            wind = wind+haystack.charAt(i+nl);

	            pw.println(i+" "+wind);
	            if(wind.equals(needle))
	            {
	                ret=i; break;
	            }

	        }

	        return (ret==-1)?-1:ret;

			}

		public static int diff(String a, String b)
		{
			int ret=0;
			for(int i=0;i<a.length();i++)
			{
				if(a.charAt(i)!=b.charAt(i))ret++;
			}
			return ret;
		}

		public static boolean inter(Vouch a, Vouch b)
		{
			//return true if there's intersection
			int s1 = a.l;
			int e1 = a.r;

			int s2 = b.l;
			int e2 = b.r;

			if(s1<s2)
			{
				if(e1>=s2)return true;
				else return false;
			}
			else if(s1>s2)
			{
				if(e2>=s1) return true;
				else return false;
			}
			else
			{
				return true;
			}

		}

		static class Com implements Comparator<Range>
		{
		    public int compare(Range a, Range b)
		    {
		         int ac=a.x; int bc=b.x;
		         if(ac>bc)return 1;
		          if(ac<bc)return -1;
		          return 0;

		    }

		}
		static class Range
		{
		    int x,y,z;

		    public Range(int a, int b,int c)
		    {
		        x=a;
		        y=b;
		        z=c;
		    }

		}

		//static ArrayList<Integer> pr;

	}


	import java.io.*;

	import java.util.*;

	   public  class Main {

		public static void main(String[] args) {

          int n = sc.nextInt();
          int k = sc.nextInt();

          int arr[] = new int[n];

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

          Arrays.sort(arr);

          int max=arr[n-1];
          int req = max/2;
          int ans=0;
          long curr=2*k;
          for(int i=0;i<n&&curr<max;i++)
          {
               int ai = arr[i];
               pw.println("ai "+ai+" curr "+curr);
               if(ai<=curr)
               {

                    curr=Math.max(curr,2*ai);

               }
               else
               {
                   // pw.println("ai "+ai+" curr "+curr);
                   while(ai>curr)
                   {
                   curr=2*curr;
                   ans++;
                   }
                   curr=Math.max(curr,2*ai);
               }

          }
          pw.println(ans);

			    pw.close();

		}

		/*public static int ispr(int n)
	    	{
	    	//boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) {
	            Prime[i] = true;
	        }

	        // mark non-primes <= n using Sieve of Eratosthenes
	        for (int factor = 2; factor*factor <= n; factor++) {

	            // if factor is prime, then mark multiples of factor as nonprime
	            // suffices to consider mutiples factor, factor+1, ...,  n/factor
	            if (Prime[factor]) {
	                for (int j = factor; factor*j <= n; j++) {
	                    Prime[factor*j] = false;
	                }
	            }
	        }
	        // count primes

	        /*int primes = 0;
	        for (int i = 2; i <= n; i++) {
	            if (isPrime	[i])System.out.println(i);

	        }*/
		// System.out.println("The number of primes <= " + n + " is " + primes);
		//return 0;
		// if(isPrime[n]==true)return 1; else return 0;

		//}

		public static long fact(long x)
		{
			if(x==0)return 1;
			else return x*fact(x-1);
		}

		public static long exp(long x, long n, long M)
		{

			if(n==0) return 1;

			else if(n%2==0) return exp((x*x)%M,n/2,M);
			else return (x*exp((x*x)%M,(n-1)/2,M))%M;

		}

		//fi

		static long fib(long n)
		{
			long F[][] = new long[][]{{1,1},{1,0}};
			if (n == 0)
				return 0;
			power(F, n-1);

			return F[0][0];
		}

		static int mod=1000000007;

		static void multiply(long F[][], long M[][])
		{
			long x =  (((F[0][0]%mod)*(M[0][0]%mod))%mod + ((F[0][1]%mod)*(M[1][0]%mod))%mod)%mod;
			long y =  (((F[0][0]%mod)*(M[0][1]%mod))%mod + ((F[0][1]%mod)*(M[1][1]%mod))%mod)%mod;
			long z =  (((F[1][0]%mod)*(M[0][0]%mod))%mod + ((F[1][1]%mod)*(M[1][0]%mod))%mod)%mod;
			long w =  (((F[1][0]%mod)*(M[0][1]%mod))%mod + ((F[1][1]%mod)*(M[1][1]%mod))%mod)%mod;

			F[0][0] = x;
			F[0][1] = y;
			F[1][0] = z;
			F[1][1] = w;
		}

		/* Optimized version of power() in method 4 */
		static void power(long F[][], long n)
		{
			if( n == 0 || n == 1)
				return;
			long M[][] = new long[][]{{1,1},{1,0}};

			power(F, n/2);
			multiply(F, F);

			if (n%2 != 0)
				multiply(F, M);
		}

		public static int gcd(int a, int b)
		{
			if(b==0)
				return a;
			else return gcd(b,a%b);
		}

		static  class MyScanner {

			BufferedReader br;
			StringTokenizer st;

			public MyScanner() {
				br = new BufferedReader(new InputStreamReader(System.in));
			}

			String next() {
				while (st == null || !st.hasMoreElements()) {
					try {
						st = new StringTokenizer(br.readLine());
					} catch (IOException e) {
						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) {
					e.printStackTrace();
				}
				return str;
			}

		}

		static MyScanner sc = new  MyScanner();
		static PrintWriter pw = new PrintWriter(System.out, true);

		static void printPath(int parent[], int j)
		{
		    // Base Case : If j is source
		    if (parent[j]==-1)
		        {pw.print(j+" ");return;}

		    printPath(parent, parent[j]);

		    pw.print(j+" ");
		}

		//Main begins here :)
	/*
		public static class Pair{
		    int a;
		    int b;
		    Pair(int p,int q){
		        a=p;
		        b=q;
		    }
		    public boolean equals(Object o) {
		        if (o instanceof Pair) {
		            Pair p = (Pair)o;
		            return p.a == a && p.b == b;
		        }
		        return false;
		    }
		    public int hashCode() {
		        return new Integer(a).hashCode() * 31 + new Integer(b).hashCode();
		    }
		}
		*/

		public static int max1(String st, int k)
		{
			int n1=0;
			int max=Integer.MIN_VALUE;
			int n = st.length();
			if(n==1)
			{
				if(st.charAt(0)=='1')return 1;
				else return 0;
			}

			for(int i=1;i<=k;i++)
			{
				int chp=i-1;

				if(st.charAt(chp)=='1')n1++;

			}
			max=Math.max(max, n1);
		//	if(k>=n)return max;
			int slides=n-k;
			int ptr1=0, ptr2=k-1;

			for(int i=1;i<=slides;i++)
			{
				//pw.println(st.substring(ptr1+i, ptr2+i+1));
				ptr1++; ptr2++;
				if(st.charAt(ptr1-1)=='1')n1--;
				if(st.charAt(ptr2)=='1')n1++;
				//pw.println("m1- "+n1);pw

				if(n1>max)max=n1;
				if(max==k){return k;}
			}

			return max;

		}

		public static String shift(String A)
		{
			char lc = A.charAt(A.length()-1);
			return lc+A.substring(0,A.length()-1);

		}

		static  class Point
		{
			long x,y;

			public Point(long a, long b)
			{
				x=a;
				y=b;
			}

			public int compareTo(Point o) {
				// TODO Auto-generated method stub
				return Long.compare(this.x, o.x);

			}

		}

		static class compx implements Comparator<Point>
		{
			public int compare(Point a, Point b)
			{

				if(a.x>b.x)return 1;
				if(a.x<b.x) return -1;

				return 0;
			}
		}

		static class compy implements Comparator<Point>
		{
			public int compare(Point a, Point b)
			{

				if(a.y>b.y)return 1;
				if(a.y<b.y) return -1;

				return 0;
			}
		}

		public static int lucky(long y)
		{

			long d = y;
			int flg=0;
			//long nd = (long)Math.floor(Math.log10((double)y));
			//pw.println(nd);
			for(;d>=1;d=d/10)
			{
				long dg = d%10;
				if(dg!=0)flg++;
				if(flg==2)return 0;

			}
			return 1;

		}

		public static int diff(Time n, Time k)
		{

			int hn=n.h,mn=n.m,sn=n.s;
			int hk=k.h,mk=k.m,sk=k.s;

			int tc=0,cs=0,cm=0,ch=0;
			if(sk>sn)
			{
				int o1 = sk-sn;
				int o2 = sn+60-sk;

				if(o1>o2)
				{
					cs=o2;
					mn--;
				}
				if(o2>o1)
				{
					cs=o1;
				}
				if(o1==o2)
				{

					int min1 = Math.min(Math.abs(mk-mn), 60 - Math.abs(mk-mn));
					int mn2 = mn-1;
					int min2  = Math.min(Math.abs(mk-mn2), 60 - Math.abs(mk-mn2));
					if(min2<min1)
					{
						cs=o2;
						mn--;
					}
					else
					{
						cs=o1;
					}

				}
			}

			if(sk<sn)
			{
				int o1 = sn-sk;
				int o2 = sk+60-sn;

				if(o1>o2)
				{
					cs=o2;
					mn++;
				}
				if(o2>o1)
				{
					cs=o1;
				}
				if(o1==o2)
				{

					int min1 = Math.min(Math.abs(mk-mn), 60 - Math.abs(mk-mn));
					int mn2 = mn+1;
					int min2  = Math.min(Math.abs(mk-mn2), 60 - Math.abs(mk-mn2));
					if(min2<min1)
					{
						cs=o2;
						mn++;
					}
					else
					{
						cs=o1;
					}

				}
			}

			if(mk>mn)
			{
				int o1 = mk-mn;
				int o2 = mn+60-mk;

				if(o1>o2)
				{
					cm=o2;
					hn--;
				}
				if(o2>o1)
				{
					cm=o1;
				}
				if(o1==o2)
				{
					int min1 = Math.min(Math.abs(hk-hn), 24 - Math.abs(hk-hn));
					int hn2 = hn-1;
					int min2  = Math.min(Math.abs(hk-hn2), 24 - Math.abs(hk-hn2));
					if(min2<min1)
					{
						cm=o2;
						hn--;
					}
					else
					{
						cm=o1;
					}
				}
			}

			if(mk<mn)
			{
				int o1 = mn-mk;
				int o2 = mk+60-mn;

				if(o1>o2)
				{
					cm=o2;
					hn++;
				}
				if(o2>o1)
				{
					cm=o1;
				}
				if(o1==o2)
				{
					int min1 = Math.min(Math.abs(hk-hn), 24 - Math.abs(hk-hn));
					int hn2 = hn+1;
					int min2  = Math.min(Math.abs(hk-hn2), 24 - Math.abs(hk-hn2));
					if(min2<min1)
					{
						cm=o2;
						hn++;
					}
					else
					{
						cm=o1;
					}
				}
			}

			ch = Math.min(Math.abs(hk-hn), 24 - Math.abs(hk-hn));
			tc=cs+cm+ch;
			return tc;

			//return 3;
		}

		public static class Time
		{
			int h,m,s;

			public Time(int x, int y, int z)
			{
				h=x; m=y; s=z;

			}

		}

		static class Pair
		{
		    int x;
		    int y;

		    public Pair(int a , int b)
		    {
		        x=a;
		        y=b;
		    }

		}

		static class comp implements Comparator<Pair>
		{

		    @Override

		    public int compare(Pair a ,Pair b)
		    {
		        if(b.x>a.x)return -1;
		        if(b.x<a.x)return 1;
		        return 0;

		    }

		}
		static class compv implements Comparator<Vouch>
		{

		    @Override

		    public int compare(Vouch a ,Vouch b)
		    {
		        if(b.c>a.c)return -1;
		        if(b.c<a.c)return 1;
		        return 0;

		    }

		}

		static class Vouch
		{
		   int l,r, c;

		    public Vouch(int a ,int b, int ci)
		    {
		        l=a;
		        r=b;
		        c=ci;

		    }

		}

		public static int strStr(final String haystack, final String needle) {

			if(needle.equals("")) return -1;
		    if(haystack.equals("")&&needle.equals(""))return -1;

		    String temp="";

		    int hl = haystack.length();
		    int nl = needle.length();
		    if(nl>hl) return -1;
		    int ret=-1;
	        String wind = haystack.substring(0,nl);
	        pw.println(wind);
	        if(wind.equals(needle)) return 0;

	        for(int i=1;i<hl-nl;i++)
	        {
	            wind = wind.substring(1, wind.length());

	            wind = wind+haystack.charAt(i+nl);

	            pw.println(i+" "+wind);
	            if(wind.equals(needle))
	            {
	                ret=i; break;
	            }

	        }

	        return (ret==-1)?-1:ret;

			}

		public static int diff(String a, String b)
		{
			int ret=0;
			for(int i=0;i<a.length();i++)
			{
				if(a.charAt(i)!=b.charAt(i))ret++;
			}
			return ret;
		}

		public static boolean inter(Vouch a, Vouch b)
		{
			//return true if there's intersection
			int s1 = a.l;
			int e1 = a.r;

			int s2 = b.l;
			int e2 = b.r;

			if(s1<s2)
			{
				if(e1>=s2)return true;
				else return false;
			}
			else if(s1>s2)
			{
				if(e2>=s1) return true;
				else return false;
			}
			else
			{
				return true;
			}

		}

		static class Com implements Comparator<Range>
		{
		    public int compare(Range a, Range b)
		    {
		         int ac=a.x; int bc=b.x;
		         if(ac>bc)return 1;
		          if(ac<bc)return -1;
		          return 0;

		    }

		}
		static class Range
		{
		    int x,y,z;

		    public Range(int a, int b,int c)
		    {
		        x=a;
		        y=b;
		        z=c;
		    }

		}

		//static ArrayList<Integer> pr;

	}