#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    scanf("%lld", &n);
    int ans = 0;
    long long count = 1;
    long long now = 1;
    while (n >= now) {
      n -= now;
      ans++;
      now = now * 2 + (count * 2) * (count * 2);
      count *= 2;
    }
    printf("%d\n", ans);
  }
  return 0;
}
