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