#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zeroupper")
#pragma GCC target("avx", "popcnt")
using namespace std;
const long long int INF = (long long int)1e17 + 5;
const unsigned long long int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<long long int> p;
  long long int pr = 1;
  for (int i = 1; i < 31; i++) {
    pr *= 2;
    long long int temp = pr - 1;
    p.emplace_back((temp * (temp + 1)) / 2);
  }
  for (int i = 1; i < p.size(); i++) {
    p[i] += p[i - 1];
  }
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    int dist = distance(p.begin(), upper_bound(p.begin(), p.end(), n));
    cout << dist << "\n";
  }
  return 0;
}
