#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int i, j, k, p, q, t, n, m, x, y;
  cin >> t;
  while (t--) {
    cin >> n;
    x = 0;
    m = 0;
    y = 0;
    while (m <= n) {
      x = (2 * x) + 1;
      m += (x * (x + 1)) / 2;
      if (m > n) break;
      y++;
    }
    cout << y << "\n";
  }
}
