#include <bits/stdc++.h>
using namespace std;
signed main() {
  std ::ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> x;
    long long ans = 0, i = 1, cur = 1;
    while (x > 0) {
      if (x - (i * (i + 1) / 2) < 0) break;
      ans++;
      x -= (i * (i + 1) / 2);
      cur = (cur << 1);
      i = i | cur;
    }
    cout << ans << "\n";
  }
}
