#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize(fast)
long long t, n, a;
signed main() {
  cin >> t;
  while (t--) {
    cin >> n;
    long long ans = 0, cost = 0;
    for (long long i = 1; cost <= n; i = 2 * i + 1) {
      cost += (1 + i) / 2 * i;
      ans++;
    }
    cout << ans - 1 << endl;
  }
  return 0;
}
