#include <bits/stdc++.h>
using namespace std;
long long solve() {
  long long n;
  cin >> n;
  long long ans = 0;
  long long x = 1;
  while (1) {
    long long t = (1LL << x) - 1;
    t = (t * (t + 1) / 2);
    if (n >= t) {
      n -= t;
      ans++;
    } else
      break;
    x++;
  }
  cout << ans << "\n";
  return 0;
}
int32_t main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
