Problem

“Why are you always authoring maths problem?” roared Jonah. He is very angry about Chris because he has authored $10$ math problems for this contest already!

“REJECTED, go back to play your MO! (Mathematics Olympiad)” said Jonah. However, Chris likes math, so he secretly adds this rejected task into the contest without being caught by Jonah! With Chris’s devil smile, please read the problem:

For an integer $C$, define a function $f(C)$ as follows:

  • For all pairs $(A, B)$ where $A \le B$ and $A, B$ are positive integers, if $A \times B = C$, then $(A, B)$ is considered as a nice pair.
  • For all nice pairs $(A_1, B_1), (A_2, B_2),\ …\ , (A_K, B_K)$, where $K$ is the number of nice pairs, $f(C) = A_1 + B_1 + A_2 + B_2 +\ …\ + A_K + B_K.$

For example, if $C = 4$, the nice pairs are $(1, 4)$ and $(2, 2)$. Then, $f(4) = 1 + 4 + 2 + 2 = 9$.

Given $Q$ queries. For the $i^{th}$ query, an integer $C_i$ is given. Your task is to find the value of $f(C_i)$.

Input

The first line contains an integer $Q$, denoting the number of queries.

For the following $Q$ lines, the $i^{th}$ line contains an integer $C_i$.

Output

Output $Q$ lines. For the $i^{th}$ query, output $f(C_i)$ on the $i^{th}$ line.

Subtasks

For all test cases, $1 \le Q \le 10^6, 1 \le C_i \le 10^7$

Subtask Score Additional Constraints
$1$ $22$ $Q = 1$
$C_1 \le 5000$
$2$ $19$ $Q = 1$
$3$ $26$ $Q \le 10^4$
$4$ $33$ No Additional Constraints

Sample Test Cases

Input Output
2
3
4
4
9
Click to copy.

Scoring: Per Subtask
Authored by s22r42
Appeared in 2026 Mini Comp 4