#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long x;
  cin >> x;
  int cnt = 1, result = 0;
  while (x > 0) {
    long long n = (1 << cnt++) - 1;
    n = (n * (n + 1)) / 2;
    x -= n;
    if (x < 0) break;
    result++;
  }
  cout << result << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
