#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    long long x, base = 0, base1 = 1, ans = 0, f = 0;
    scanf("%lld", &x);
    for (int i = 1;; i++) {
      base = (base << 1ll) + base1 * base1;
      ans += base;
      base1 <<= 1;
      if (ans > x) {
        printf("%d\n", i - 1);
        break;
      }
    }
  }
  return 0;
}
