#include <bits/stdc++.h>
using ll = long long;
using namespace std;
void solve() {
  ll n;
  cin >> n;
  map<ll, ll> mp;
  mp[1] = 1;
  int cur = 1;
  if (n < 1) {
    cout << 0 << endl;
    return;
  }
  ll cnt = 1;
  n -= 1;
  while (n > 0) {
    ll s = 0;
    for (auto x : mp) {
      mp[x.first] = x.second * 2;
      s += x.first * (x.first) * x.second * 2LL;
    }
    cur *= 2;
    s += cur * 1LL * cur;
    mp[cur] = 1;
    n -= s;
    if (n >= 0) {
      cnt += 1;
    }
  }
  cout << cnt << endl;
  return;
}
int main(int argc, const char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  for (int tt = 0; tt < t; tt++) {
    solve();
  }
  return 0;
}
