#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
const long long inf = 1e15;
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cout.precision(3);
  long long t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> x;
    long long res = 0;
    long long num = 1;
    while (true) {
      if (num * (num + 1) / 2 > x) break;
      x -= num * (num + 1) / 2;
      res++;
      num = num * 2 + 1;
    }
    cout << res << endl;
  }
}
