using namespace std;
int main(int argc, char const* argv[])
{
int t;
while(~scanf("%d",&t)){
while(t--){
int n;
scanf("%d",&n);
int sq = sqrt(n);
long long ans = 0;
for(int i = 1;i <= sq;i++){
int count = n/i-(n/(i+1));
if(i == n/i){
ans = ans+i;
}else{
ans = ans+count*i+n/i;
}
}
printf("%lld\n",ans);
}
}
return 0;
}