#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, nicestairs = -1, cubes = 0, power = 1, stair = 1;
    cin >> n;
    while (n >= cubes) {
      stair = pow(2, power) - 1;
      cubes += stair * (stair + 1) / 2;
      nicestairs++;
      power++;
    }
    cout << nicestairs << endl;
  }
  return 0;
}
