t=int(raw_input())
while t:
z=int(0)
n=int(raw_input())
if n==0 or n==1:
print("0")
continue
sum=int(n)-1
m=int(n**0.5)
k=2
while k<=m:
z=(n/k)-k
sum+=(k*(z+1)+z*(2*(k+1)+(z-1))/2)
k=k+1
print(sum)
t=t-1
dD1pbnQocmF3X2lucHV0KCkpCndoaWxlIHQ6CiAgICB6PWludCgwKQogICAgbj1pbnQocmF3X2lucHV0KCkpCiAgICBpZiBuPT0wIG9yIG49PTE6CiAgICAgICAgcHJpbnQoIjAiKQogICAgICAgIGNvbnRpbnVlCiAgICBzdW09aW50KG4pLTEKICAgIG09aW50KG4qKjAuNSkKICAgIGs9MgoKICAgIHdoaWxlIGs8PW06CiAgICAgICAgej0obi9rKS1rCiAgICAgICAgc3VtKz0oayooeisxKSt6KigyKihrKzEpKyh6LTEpKS8yKQogICAgICAgIGs9aysxCiAgICBwcmludChzdW0pCiAgICB0PXQtMQ==