URI Online Judge | 2291

Divine Numbers

By Francisco Elio Parente Arcos Filho, UEA BR Brazil

Timelimit: 1

Perfect numbers are numbers that are equal to the sum of its divisors , excluding himself. Based on this concept, divine numbers are numbers that are equal to the sum of the sum of each divisor of which number from 1 to N.

For example , 15 is the fourth divine number because
1 is the sum of divisors of 1 ,
3 is the sum of the divisors of 2,
4 is the sum of the divisors 3 ,
7 is the sum of divisors of 4 ,
and 15 = 1 + 3 + 4 + 7 .

Given a number N find the Nth Divine number.

Input

The input consists of several test cases . Each test case contains a single integer N (1 ≤ N ≤ 106) which corresponds to the Divine order number as specified. The input ends when N = 0.

Output

The output consists of one line per test case containing the Nth Divine number.

Input Sample Output Sample

1
2
3
4
100
0

1
4
8
15
8299