#include <bits/stdc++.h>
using namespace std;
bool comp(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first < b.first;
}
bool comps(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.second == b.second) return a.first < b.first;
  return a.second < b.second;
}
void fastio() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
void inout() {}
long long int su(long long int x) { return (x * (x + 1)) / 2; }
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int x;
    cin >> x;
    long long int cnt = 0;
    long long int l = 1;
    long long int nx = 1;
    while (x - nx >= 0) {
      x -= nx;
      l = 2 * l + 1;
      nx = su(l);
      cnt++;
    }
    cout << cnt;
    cout << "\n";
    ;
  }
  return 0;
}
