#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    long long res = 1, ans = 0;
    while (n >= res * (res + 1) / 2)
      n -= res * (res + 1) / 2, res = (res + 1) << 1, res--, ans++;
    cout << ans << endl;
  }
  return 0;
}
