#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  vector<long long> v;
  long long num = 1, bs = 1;
  while (num < 1e18) {
    v.push_back(num);
    num = 2 * num + (bs + 1) * (bs + 1);
    bs = 2 * bs + 1;
  }
  long long t;
  cin >> t;
  while (t--) {
    long long num;
    cin >> num;
    long long ans = 0;
    for (long long i = 0; i < v.size(); i++) {
      if (num < v[i]) break;
      num -= v[i];
      ans++;
    }
    cout << ans << '\n';
  }
  return 0;
}
