#include <bits/stdc++.h>
using namespace std;
clock_t begtime = clock();
unsigned long long int a[32];
void init() {
  long long int k = 0;
  for (long long int i = 2; k < 31; i = i << 1) {
    a[k] = i * (i - 1) / 2;
    k++;
  }
}
void solve() {
  long long int x;
  cin >> x;
  long long int ans = 0, k = 0;
  while (x > 0) {
    x = x - a[k];
    k++;
    ans++;
  }
  if (x < 0) ans--;
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  init();
  int T;
  cin >> T;
  for (long long int t = 1; t <= T; t++) {
    solve();
    cout << "\n";
  }
  return 0;
}
