#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, x = 1, tmp;
  cin >> t;
  while (t--) {
    long long n, count = 0, i = 1;
    x = 1;
    cin >> n;
    while (1) {
      i = 2 * x - 1;
      tmp = ((i) * (i + 1)) / 2;
      if (tmp > n) {
        cout << count << endl;
        break;
      }
      n -= tmp;
      count++;
      x *= 2;
    }
  }
  return 0;
}
