#include <bits/stdc++.h>
using namespace std;
long long cellNum(long long n) { return (1 + n) * n / 2; }
int main() {
  int t;
  cin >> t;
  for (long long testcase = 0; testcase < t; testcase++) {
    long long x;
    cin >> x;
    int count = 0;
    for (long long i = 1; x >= cellNum(i); x -= cellNum(i), i = i * 2 + 1) {
      count++;
    }
    cout << count << endl;
  }
}
