1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int tt;
  6. cin >> tt;
  7. while (tt--) {
  8. int n;
  9. cin >> n;
  10. cout << n + __builtin_clz(n) - 32 << endl;
  11. }
  12. return 0;
  13. }