#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    ll x;
    cin >> x;
    ll i = 1;
    ll count = 0;
    ll d = 2;
    while (x > 0) {
      x -= (i * (i + 1)) / 2;
      if (x >= 0) {
        count++;
      } else {
        break;
      }
      i += d;
      d *= 2;
    }
    cout << count << "\n";
  }
  return 0;
}
