Problem:
Problem J: No Story

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.

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.

Constraints

1 ≤ L ≤ 1012

Sample Input

12
9
2
0

Output for the Sample Input

8
3
2

Solution in C++11 (judge verdict: Wrong Answer)

#define _CRT_SECURE_NO_WARNINGS
#include <iomanip>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <sstream>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<(DUMP(),__VA_ARGS__).str()<<" ["<<__LINE__<<"]"<<endl)
struct DUMP:ostringstream{template<class T>DUMP &operator,(const T&t){if(this->tellp())*this<<", ";*this<<t;return *this;}};
#else
#define dump(...)
#endif

map<ll,ll> pfd(ll x){
    map<ll,ll> res;
    ll e = sqrt(x)+2;
    for(ll i=2;i<e;i++){
        if(x%i==0){
            int cnt=0;
            while(x%i==0){
                cnt++;
                x/=i;
            }
            res[i]=cnt;
        }
    }
    return res;
}

int main(){
    ll L;
    while(cin>>L && L){
        auto ps = pfd(L);
        if(L==1){
            cout << 1 << endl;
        }
        else if(ps.size()){
            ll ans = 1;
            for(auto p : ps){
                ll l = p.second;
                // dump(l);
                ans *= l*2+1;
            }
            cout << ans/2+1 << endl;
        }else{
            cout << 2 << endl;
        }
    }
}