#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> x;
    long long base = 1;
    long long needed = 1;
    int ans = 0;
    while (x - needed >= 0) {
      x -= needed;
      ans++;
      needed += needed;
      needed += (base * 2) * (base * 2);
      base <<= 1;
    }
    cout << ans << endl;
  }
  return 0;
}
