#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
// Function to count the number of divisors of a number x
int count_divisors(int x) {
int divisors = 0;
for (int i = 1; i <= sqrt(x); ++i) {
if (x % i == 0) {
divisors++;
if (i != x / i) {
divisors++;
}
}
}
return divisors;
}
int main() {
const int MAX_N = 1000000;
// Precompute the maximum divisors up to each N
vector<int> max_divisors_up_to(MAX_N + 1, 0);
// Precompute number of divisors for S(L) and store maximum divisors for each L
for (int L = 1; L <= MAX_N; ++L) {
int S_L = L * (L + 1) / 2;
int divisors_count = count_divisors(S_L);
max_divisors_up_to[L] = max(max_divisors_up_to[L - 1], divisors_count);
}
// Read number of test cases
int T;
cin >> T;
// Process each test case
while (T--) {
int N;
cin >> N;
cout << max_divisors_up_to[N] << endl;
}
return 0;
}