#include <bits/stdc++.h>
using namespace std;
long long t, x, tam, a[100], ans;
int main() {
  cin >> t;
  tam = 1e18;
  long long hihi = 1;
  long long bla;
  int dem = 1;
  while (hihi <= tam) {
    bla = hihi * (hihi + 1) / 2;
    a[dem] = bla;
    if (bla < 0) break;
    hihi = hihi * 2 + 1;
    dem++;
  }
  for (int i = 1; i <= t; i++) {
    cin >> x;
    ans = 0;
    for (int i = 1; i <= dem - 1; i++) {
      if (x - a[i] < 0) {
        cout << ans << "\n";
        break;
      } else {
        x = x - a[i];
        ans++;
      }
    }
  }
}
