#include <bits/stdc++.h>
using namespace std;
using std::ios;
constexpr int MOD = 1e9 + 7;
constexpr int mod = 998244353;
template <typename T>
T power(T a, T b) {
  T r = 1;
  while (b) {
    if (b & 1) r *= a;
    b /= 2;
    a *= a;
  }
  return r;
}
int d[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  cin >> tt;
  while (tt--) {
    long long n;
    cin >> n;
    long long sum = 0;
    long long p = 2, ans = 0;
    while (1) {
      long long k = p - 1;
      k = k * (k + 1) / 2;
      if (n < k) break;
      n -= k;
      p *= 2;
      ans++;
    }
    cout << ans << '\n';
  }
}
