#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
void solve() {
  long long x;
  cin >> x;
  long long n = 2;
  long long tot = (n * (n - 1)) / 2;
  long long ans = 0;
  while (tot <= x) {
    ans++;
    n *= 2;
    tot += (n * (n - 1)) / 2;
  }
  cout << ans << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
