Since I got tired to write long problem statements, I decided to make this problem statement short. For given positive integer L, how many pairs of positive integers a, b (a ≤ b) such that LCM(a, b) = L are there? Here, LCM(a, b) stands for the least common multiple of a and b.

Constraints

* 1 ≤ L ≤ 1012

Input

For each dataset, an integer L is given in a line. Input terminates when L = 0.

Output

For each dataset, output the number of pairs of a and b.

Example

Input

12
9
2
0


Output

8
3
2
#include<cstdio>
#include<vector>

#define	pb	push_back

using namespace std;

typedef	vector<int>	vi;

int main(){
	static bool era[1000000];
	for(int i=2;i<100;i++){
		if(!era[i])	for(int j=i*i;j<1000000;j+=i)	era[j]=true;
	}

	vi pr;
	for(int i=2;i<1000000;i++)	if(!era[i])	pr.pb(i);
	int n=pr.size();

	for(long long L;scanf("%lld",&L),L;){
		if(L==1){ puts("1"); continue; }

		vi q;
		int old=-1;
		for(int i=0;i<n&&L>1;){
			if(L%pr[i]==0){
				L/=pr[i];
				if(old==i)	q.back()++;
				else		q.pb(1);
				old=i;
			}
			else	i++;
		}
		if(L>1)	q.pb(1);

		int prod=1;
		for(int i=0;i<q.size();i++)	prod*=(2*q[i]+1);
		printf("%d\n",(prod-1)/2+1);
	}

	return 0;
}