#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long x;
    long long a = 1, cnt = 0;
    cin >> x;
    while (1) {
      long long tmp = (a + 1) / 2 * a;
      x -= tmp;
      if (x < 0) break;
      cnt++;
      a = a * 2 + 1;
    }
    cout << cnt << endl;
  }
  return 0;
}
