#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

void integerFactorization(long long n, vector<long long>& base, vector<int>& exp)
{
    base.clear();
    exp.clear();
    long long a = 2;
    while(a * a <= n){
        int b = 0;
        while(n % a == 0){
            ++ b;
            n /= a;
        }
        if(b > 0){
            base.push_back(a);
            exp.push_back(b);
        }
        ++ a;
    }
    if(n > 1){
        base.push_back(n);
        exp.push_back(1);
    }
}

long long solve(long long n)
{
    vector<long long> base;
    vector<int> exp;
    integerFactorization(n, base, exp);
    int m = exp.size();

    long long ret = 1;
    for(int i=0; i<m; ++i)
        ret *= 2 * exp[i] + 1;
    ++ ret;
    ret /= 2;
    return ret;
}

int main()
{
    for(;;){
        long long n;
        cin >> n;
        if(n == 0)
            return 0;
        cout << solve(n) << endl;
    }
}