#include <bits/stdc++.h>
using namespace std;
long long op[65], n;
int main() {
  for (int i = 0; i < 32; i++) op[i] = 1ll * ((1ll << i) - 1) * (1ll << i) / 2;
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%lld", &n);
    int ans = 0;
    for (int i = 1; i < 32; i++) {
      if (n >= op[i]) ++ans, n -= op[i];
    }
    printf("%d\n", ans);
  }
  return 0;
}
