#include <bits/stdc++.h>
using namespace std;
char buf[1 << 20], *p1, *p2;
inline int _R() {
  int d = 0;
  bool ty = 1;
  char t;
  while (t = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin),
                           p1 == p2)
                  ? 0
                  : *p1++),
         (t < '0' || t > '9') && t != '-')
    ;
  t == '-' ? (ty = 0) : (d = t - '0');
  while (t = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin),
                           p1 == p2)
                  ? 0
                  : *p1++),
         t >= '0' && t <= '9')
    d = (d << 3) + (d << 1) + t - '0';
  return ty ? d : -d;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    long long n;
    scanf("%lld", &n);
    long long x = 0, y = 0;
    int ans;
    for (int i = 1; i <= 30; i++) {
      y = y * 2 + 1;
      x += y * (y + 1) / 2;
      if (x <= n)
        ans = i;
      else
        break;
    }
    printf("%d\n", ans);
  }
}
