FF's Divisors

Statement:

Litle Felix Fuente a.k.a FF wants to solve his math assignment. His teacher has taught him that a number n has d1, d2, d3, ..., di divisors (1 and itself included). If p = d1 * d2 * d3 * ... * di, help FF find the total number of divisors of p.

Input:

Several lines but no more than 120. Each line of input contains an integer n (1 <= n <= 107). The input ends with a line containing 0.

Output:

For each input line output the number of divisors of p.

Example input:
1
2
3
4
0
Example output:
1
2
2
4
Time and memory limit:

  • 1s
  • 64MB

Problem source: Caribbean Online Judge