#include <bits/stdc++.h>
using namespace std;
long long sum[10005];
void Init() {
  sum[1] = 1;
  long long len = 1, s = 1;
  int index = 1;
  while (true) {
    s <<= 1;
    len += s;
    long long res = len * (len + 1) >> 1;
    sum[++index] = res;
    if (res > 1e18) break;
  }
}
int main() {
  ios::sync_with_stdio(0);
  Init();
  int t;
  cin >> t;
  while (t--) {
    long long x, ans = 0;
    cin >> x;
    for (int i = 1; i < 10005; i++) {
      if (sum[i] > x) break;
      x -= sum[i];
      ans++;
    }
    cout << ans << endl;
  }
  return 0;
}
