#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, ans = 0;
  cin >> n;
  long long int a[50] = {1};
  for (long long int i = 1; i < 50; i++) a[i] = (2 * a[i - 1]) + 1;
  long long int i = 0;
  while (1) {
    long long int p = a[i++];
    long long int mul;
    if (p % 2) {
      mul = (p + 1) / 2;
      mul *= p;
    } else {
      mul = p / 2;
      mul *= (p + 1);
    }
    if (n - mul >= 0) {
      n = n - mul;
      ans++;
    } else
      break;
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
