#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
int a[maxn];
int main() {
  int n, k;
  while (cin >> n >> k) {
    for (int i = 0; i < n; ++i) cin >> a[i];
    sort(a, a + n);
    int ma = k, ans = 0;
    for (int i = 0; i < n; ++i) {
      int t = a[i] % 2 ? a[i] / 2 + 1 : a[i] / 2;
      if (ma >= t)
        ma = max(ma, a[i]);
      else {
        while (ma < t) {
          t = t % 2 ? t / 2 + 1 : t / 2;
          ans++;
        }
        ma = a[i];
      }
    }
    cout << ans << endl;
  }
  return 0;
}
