#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const long long INF = 1e18;
const int mod = 1e9 + 7;
const int bit32 = log2(inf) + 3;
const int bit64 = log2(INF) + 3;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
clock_t time_p = clock();
void ktj() {
  time_p = clock() - time_p;
  cerr << "Time elapsed : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
void pre() {}
long long sumN(long long x) {}
void solve() {
  long long n, ans = 0, cnt = 1;
  cin >> n;
  long long sum = 0;
  while (1) {
    sum += cnt * (cnt + 1) / 2;
    if (sum > n) break;
    cnt += 1;
    cnt *= 2;
    cnt -= 1;
    ans += 1;
  }
  cout << ans << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  pre();
  int t = 1, T;
  if (1) cin >> t;
  for (T = 1; T <= t; T++) {
    if (0) cout << "Case #" << T << ": ";
    solve();
  }
  ktj();
}
