#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int req = 1;
    long long int z = 1;
    long long int noice = 0;
    long long int totalst = 0;
    while (totalst < n) {
      totalst += req * (req + 1) / 2;
      noice++;
      z *= 2;
      req += z;
    }
    if (totalst > n) noice--;
    cout << noice << endl;
  }
  return 0;
}
