#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
using namespace std;
using ld = long double;
using lli = long long;
using ii = pair<int, int>;
using vi = vector<int>;
lli x;
lli g(lli x) { return x * (x + 1) / 2; }
void testCase() {
  cin >> x;
  int i = 0;
  while (x > 0) {
    lli y = (1 << (i + 1)) - 1;
    x -= g(y);
    if (x >= 0) ++i;
  }
  cout << i << '\n';
}
int main() {
  cin.tie(0)->sync_with_stdio(0), cout.tie(0);
  int tc = 1;
  cin >> tc;
  while (tc--) testCase();
  return 0;
}
