Sum Of Factors

medium
Given a number n, output the summation of all its proper Factors.

Note: A proper Factor of a natural number is the divisor that is strictly less than the number.

Input Format

The first line contains integer t stating number of test cases. For next t lines, each line contains an integer n.

Output Format

In each of t lines, print the summation of Factors of the Integer given.

Constraints

1<= t <= 10^5
1<= n <= 10^5

Example

Input
3
2
10
20
Output
1
8
22
Previous
Relatively Prime Pairs
Next
Chinese Remainder Theorem

Related Questions