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