#include <bits/stdc++.h>
using namespace std;
ifstream f("date.in");
ofstream g("date.out");
int main() {
  int t, num;
  long long x, n, c;
  cin >> t;
  while (t--) {
    c = 1;
    n = 1;
    num = 0;
    cin >> x;
    while (1) {
      c = n * (n + 1) / 2;
      if (x >= c) {
        x = x - c;
        num++;
        n = 2 * n + 1;
      } else {
        break;
      }
    }
    cout << num << '\n';
  }
}
