#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, x, sum;
  long long pows[100];
  long long vals[100];
  cin >> t;
  for (long i = 0; i < 31; i++) {
    pows[i] = pow(2, i + 1) - 1;
  }
  vals[0] = 1;
  for (long i = 1; i < 31; i++) {
    vals[i] = (pows[i] * (pows[i] + 1)) / 2 + vals[i - 1];
  }
  while (t--) {
    sum = 0;
    cin >> x;
    for (long i = 0; i < 62; i++) {
      if (x >= vals[i]) {
        sum++;
      } else {
        cout << sum << endl;
        break;
      }
    }
  }
}
