#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> so,v;
ll ans;
void dfs(int d,int t){
  if(d==v.size()){
    ans+=t;
    return;
  }
  for(int i=0;i<=v[d];i++){
    int nt=t;
    if(v[d]==i)nt*=i+1;
    dfs(d+1,nt);
  }
}
 
int main(){
  ll n;
  while(cin>>n&&n){
    ans=1;
    v.clear();
    ll tmp=n;
    for(ll i=2;i*i<=n;i++)
      if(tmp%i==0){
	v.push_back(0);
	while(tmp%i==0)tmp/=i,v[v.size()-1]++;
      }
    if(tmp>1)v.push_back(1);
    dfs(0,1);
    cout<<ans/2<<endl;
  }
  return 0;
}