#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int x;
  cin >> x;
  long long int sum = 0;
  long long int cnt = 0;
  long long int var = 1;
  for (long long int i = 1; sum <= x; i += var) {
    sum += (long long int)(i * (i + 1) / 2);
    if (sum > x) break;
    cnt++;
    var *= 2;
  }
  cout << cnt << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
