#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long hcf(long long n1, long long n2) {
  if (n2 != 0)
    return hcf(n2, n1 % n2);
  else
    return n1;
}
long long fact(long long n) {
  long long i = 1, co = 1;
  for (i = 1; i <= n; i++) co *= i;
  return co;
}
long long isprime(long long n) {
  if (n <= 1) return 0;
  if (n <= 3) return 1;
  if (n % 2 == 0 || n % 3 == 0) return 0;
  for (long long i = 5; i <= sqrt(n); i += 6) {
    if (n % i == 0 || n % (i + 2) == 0) return 0;
  }
  return 1;
}
long long sod(long long n) {
  long long sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
long long highestPowerof2(long long n) {
  long long p = (long long)log2(n);
  return (long long)pow(2, p);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  t = 1;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long q = 0;
    long long w = 0;
    for (int i = 1; i < 31; ++i) {
      long long q = pow(2, i) - 1;
      n = n - q * (q + 1) / 2;
      w++;
      if (n < 0) {
        w--;
        break;
      }
    }
    cout << w << '\n';
  }
  return 0;
}
