#include <bits/stdc++.h>
using namespace std;
long long n;
long long INF = 1e18 + 10;
unordered_set<long long> s;
void solve() {
  long long count = 0;
  for (long long i = 1; i < INF; i = 2 * i + 1) {
    long long num = ((i + 1) / 2) * i;
    if (n < num) break;
    count++;
    n -= num;
  }
  cout << count << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    s.clear();
    solve();
  }
}
