#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long T;
  cin >> T;
  while (T--) {
    long long x;
    cin >> x;
    long long ans = 0;
    for (register long long i = 1;; i++) {
      long long now = (1 << i) - 1;
      long long tot = now * (now + 1) / 2;
      if (tot > x) break;
      ans++, x -= tot;
    }
    cout << ans << endl;
  }
  return 0;
}
