#include <bits/stdc++.h>
using namespace std;
template <typename T, typename S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  os << "(";
  os << v.first << "," << v.second << ")";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  long long sz = v.size();
  for (long long i = 0; i < sz; ++i) {
    os << v[i];
    if (i != sz - 1) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const list<T>& v) {
  os << "[";
  long long sz = v.size();
  long long i = 0;
  for (auto x : v) {
    os << x;
    if (i != sz - 1) os << ",";
    ++i;
  }
  os << "]\n";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  T last = *v.rbegin();
  os << "[";
  for (auto it : v) {
    os << it;
    if (it != last) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  for (auto it : v) {
    os << it.first << " : " << it.second << "\n";
  }
  return os;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b % 2) {
      res = (res * a) % 1000000007;
    }
    b /= 2;
    a = (a * a) % 1000000007;
  }
  return res;
}
uint64_t toint(const string& s) {
  istringstream src(s);
  uint64_t v;
  src >> v;
  return v;
}
string tostring(uint64_t v) {
  ostringstream src;
  src << v;
  return src.str();
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const long long N = 100000 + 5;
void solveA() {
  long long len;
  string s;
  cin >> len;
  cin >> s;
  vector<long long> v(2, 0);
  for (decltype(1) i = 1; i <= len; i++) {
    long long d = s[i - 1] - '0';
    if (i & 1) {
      if (d & 1) v[0]++;
    } else {
      if (d % 2 == 0) v[1]++;
    }
  }
  if (len & 1) {
    if (v[0] >= 1)
      cout << 1;
    else
      cout << 2;
  } else {
    if (v[1] >= 1)
      cout << 2;
    else
      cout << 1;
  }
}
void solveB() {
  long long x;
  cin >> x;
  long long ans = 0;
  for (long long i = 1; i * (i + 1) / 2 <= x; i = 2 * i + 1) {
    ans++;
    x -= i * (i + 1) / 2;
  }
  cout << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    solveB();
    cout << "\n";
  }
  return 0;
}
