#include <bits/stdc++.h>
using namespace std;
const int dr[]{-1, -1, 0, 1, 1, 1, 0, -1};
const int dc[]{0, 1, 1, 1, 0, -1, -1, -1};
void run() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void solve() {
  long long x;
  cin >> x;
  int cnt = 0;
  for (int i = 1; (1LL << i) - 1 <= x; i++) {
    long long n = (1LL << i) - 1;
    n = n * (n + 1) / 2;
    if (n > x) break;
    x -= n;
    cnt++;
  }
  cout << cnt << "\n";
}
int main() {
  run();
  int T;
  cin >> T;
  for (int I = 1; I <= T; I++) {
    solve();
  }
}
