#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
using namespace std;
const int N = 5e5 + 5;
const int mod = 998244353;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
const int LEVEL = log2(N) + 1;
long long n;
void solve() {
  cin >> n;
  long long x = 1, ct = 0;
  while (x * (x + 1) / 2 <= n) {
    n -= x * (x + 1) / 2;
    ct++;
    x = x * 2 + 1;
  }
  cout << ct << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(15);
  ;
  int test = 1;
  cin >> test;
  for (int i = 1; i <= test; i++) {
    solve();
  }
}
