#include using namespace std; using ll=long long; using ld=long double; using vi=vector; using ii=pair; #define FOR(i,a,b) for(int i=a; i < b; i++) #define F(x) FOR(i, 0, x) #define FF(n) FOR(j, 0, n) #define aa first #define bb second #define PB push_back void solve() { ll n; scanf("%lld", &n); ll sol = 0; F(n) { if (i > 102) break; FOR(j, i+1, n) { if (j > 1002) break; ll two = (ll) (i+1) * (j+1); ll rem = n / two; if (rem <= j+1) break; sol += rem - (j+1); } } printf("%lld\n", sol); } int main() { int t; scanf("%d", &t); F(t) { solve(); } return 0; }