#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  vector<unsigned long long int> a(1, 0);
  unsigned long long int x, s = 0, count = 0;
  a[0] = 1;
  for (int i = 1; s <= 1e18; i++) {
    s = 2 * a[i - 1] + pow(2, 2 * i);
    a.push_back(s);
  }
  for (int i = 1; i < a.size(); ++i) {
    a[i] += a[i - 1];
  }
  while (t--) {
    cin >> x;
    count = (upper_bound(a.begin(), a.end(), x)) - a.begin();
    cout << count << "\n";
  }
}
