#include<bits/stdc++.h>
#define ll long long
using namespace std;
int const N = 1e6 + 2;
vector<ll> a(N);
class SegmentTree {
public:
ll n;
vector<ll> tree;
SegmentTree(ll n) : tree(2 * n + 10), n(n){};
void build() {
for (int i = 1; i <= n; i++)
tree[n + i] = a[i];
for (int i = n; i > 0; i--)
tree[i] = max(tree[i << 1], tree[i << 1 | 1]);
}
ll query(int l, int r) {
ll res = 0;
for (l += n, r += n + 1; l < r; l >>= 1, r >>= 1) {
if (l & 1) res = max(res, tree[l++]);
if (r & 1) res = max(res, tree[--r]);
}
return res;
}
};
int main() {
ll S = 0;
for (int i = 1; i < N - 1; i++){
S += i;
ll c = 0;
for (int j = 1; j * j <= S; j++){
if (S % j == 0){
c++;
if (S / j != j) c++;
}
}
a[i] = c;
}
SegmentTree mx(N - 1);
mx.build();
int t;
cin >> t;
while (t--){
ll n;
cin >> n;
cout << mx.query(1, n) << endl;
}
}