#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    long long x;
    cin >> x;
    long long ans = 0;
    for (long long i = 2; i <= x * 2LL; i *= 2) {
      long long cell = i * (i - 1) / 2;
      if (cell > x) break;
      ans++;
      x -= cell;
    }
    cout << ans << '\n';
  }
}
