#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> res;
    long long val = 1, ans = 0;
    while ((val * (val + 1)) / 2 <= n) {
      ans++;
      n -= (val * (val + 1)) / 2;
      val = val * 2 + 1;
    }
    cout << ans << endl;
  }
  return 0;
}
