#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, a, b, c, d, i, j, k, l, n, m, x, y;
  cin >> t;
  while (t--) {
    cin >> n;
    l = 1;
    k = 0;
    a = 0;
    x = 1;
    j = 0;
    while (1) {
      a = ((l * (l - 1)) / 2) + l;
      n = n - a;
      if (n >= 0) j++;
      l += pow(2, x);
      x++;
      if (n <= 0) break;
    }
    cout << j << endl;
  }
}
