1. 

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #11526 H(n)
* Link: http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1103
*
* @author Fabian Seidl
* @author Marcel Sachse
* @version 1.0, 29/04/2009
*
* Status : Accepted
* Runtime: 1.910
*/

import java.io.*;

public class Main
{

public static void main(String[] args) throws Exception
{

InputStreamReader bInput = new InputStreamReader(System.in);
BufferedReader bReader = new BufferedReader(bInput);

Writer out = new BufferedWriter(new PrintWriter(System.out));


int numberOfTests = Integer.parseInt(bReader.readLine());

for(int i=0;i<numberOfTests;i++)
{
int n = Integer.parseInt(bReader.readLine());
out.write(H(n)+"\n");

}

out.close();
}

private static long H(long n)
{
long res = 0;

long lastSum = n;
double end = Math.sqrt(n)+1;

for( int k = 2; k <= end; k++ )
{
res += lastSum;
long nextResult = n/k;
if(lastSum!=k-1) res += (lastSum - nextResult) * (k-1);
lastSum = nextResult;
}

return res;
}
}