#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    long long ans = 0, start = 1;
    while (true) {
      long long temp = (start * (start + 1LL)) / 2LL;
      if (n - temp < 0) break;
      ans++;
      n -= temp;
      start = start + (start + 1LL);
    }
    cout << ans << '\n';
  }
}
