#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 1;
long long a[N];
int accept() {
  long long x;
  cin >> x;
  long long cur = 0, pw = 1, res = 0, p = 2;
  for (long long i = 1; i < 59; i++) {
    if ((x - ((pw * (pw + 1)) / 2)) >= 0) {
      cur = ((pw * (pw + 1)) / 2);
      p *= 2;
      pw = p - 1;
      x -= cur;
      res++;
    } else
      break;
  }
  cout << res << "\n";
  return 0;
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    accept();
  }
  return 0;
}
