#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, q = 0, n = 0, p = 1, s = 0;
    cin >> n;
    s = n;
    a = 2;
    for (a = 2;; a = a * 2) {
      p = a - 1;
      n = n - (p * (p + 1)) / 2;
      if (n >= 0)
        q++;
      else
        break;
    }
    cout << q << endl;
  }
}
