#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
vector<int> spf(N + 1);
vector<int> max_divisors(N + 1, 0);
void sieve() {
for (int i = 2; i <= N; ++i) {
if (spf[i] == 0) {
spf[i] = i;
for (int j = i * i; j <= N; j += i) {
if (spf[j] == 0) {
spf[j] = i;
}
}
}
}
}
int num_divisors(int x) {
if (x == 1) return 1;
int res = 1;
while (x > 1) {
int p = spf[x];
int count = 0;
while (x % p == 0) {
x /= p;
count++;
}
res *= (count + 1);
}
return res;
}
void precompute() {
sieve();
int current_max = 0;
for (int L = 1; L <= N; ++L) {
int S = L * (L + 1) / 2;
int divisors = num_divisors(S);
if (divisors > current_max) {
current_max = divisors;
}
max_divisors[L] = current_max;
}
}
void solve() {
int n;
cin >> n;
cout << max_divisors[n] << '\n';
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
precompute();
int tt;
cin >> tt;
while (tt--) {
solve();
}
return 0;
}