#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline int read() {
  int x = 0;
  int f = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    f |= (ch == '-') ? 1 : 0;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return f ? -x : x;
}
int t;
long long x;
long long pp[110];
int main() {
  t = read();
  for (int i = 1; i <= 30; ++i)
    pp[i] = (long long)((1ll << i) - 1) * (1ll << (i - 1));
  while (t--) {
    scanf("%lld", &x);
    int ans = 0;
    for (int i = 1; i <= 30; ++i) {
      if (x >= pp[i]) x -= pp[i], ++ans;
    }
    printf("%d\n", ans);
  }
}
