#include <bits/stdc++.h>
        #include <math.h>
    
        using namespace std;
        typedef long long ll;
        typedef unsigned long long ull;
        # define M_PI  3.14159265358979323846
    
    
        const int M=1e9+7;
        long long mod(long long x){
            return ((x%M + M)%M);
        }
        long long add(long long a, long long b){
            return mod(mod(a)+mod(b));
        }
        long long mul(long long a, long long b){
            return mod(mod(a)*mod(b));
        }
    
        ll modPow(ll a, ll b){
            if(b==0)
                return 1LL;
            if(b==1)
                return a%M;
            ll res=1;
            while(b){
                if(b%2==1)
                    res=mul(res,a);
                a=mul(a,a);
                b=b/2;
            }
            return res;
        }

        void solve (){
            ll n;
            cin>>n;
            n=2*n;
            ll ans=0;
            for(ll i=1;i*i<=n;i++){
                if(n%i==0){
                    ll f1=i;
                    ll f2=n/i;
                    if((f2+1-f1)%2==0) ans++;
                    if(n/i != i){
                    ll f1=n/i;
                    ll f2=i;
                    if((f2+1-f1)%2==0) ans++;
                    }
                }
            }
            cout<<ans;
        }
        int main(){
            ios::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            cout<<fixed;
            cout<<setprecision(10);
    //        freopen("timber_input.txt", "r", stdin);
    //        freopen("timber_output.txt", "w", stdout);
            int t=1;
            // cin>>t;
            for(int i=1;i<=t;i++){
            //    cout<<"Case #"<<i<<": ";
                solve();
            }
            return 0;
        }
#include <bits/stdc++.h>
using namespace std;
#define rep(i, l, n) for (int i = (int)(l); i < (int)(n); i++)
#define drep(i, n, l) for (int i = (int)(n); i > (int)(l); i--)
#define INF INT_MAX
#define INFF (pow(2,64))
#define def (200007)
#define MOD (1000000007)
typedef int64_t intt;
typedef vector<int> veci;
typedef vector<vector<int>> Veci;
typedef vector<int64_t> vecit;
typedef vector<vector<int64_t>> Vecit;
typedef vector<vector<double>> Vecd;
typedef vector<double> vecd;
typedef pair<intt, intt> P;
typedef unordered_set<int> uset;
typedef unordered_set<intt> usett;
int main(){
  intt N;cin>>N;
  intt sum=0;
  veci allgcd(pow(N,0.5)+1,0);
  intt at_n=N;
  rep(i,2,pow(N,0.5)+1){
    if(N%i==0){
      while(at_n%i==0){
        allgcd[i]++;
        at_n/=i;
      }
    }
  }
  
  intt at_sum=1;
  rep(i,3,allgcd.size()){
    if(allgcd[i]>=1)at_sum*=(allgcd[i]+1);
  }
  if(at_n>2)at_sum*=2;
  sum+=at_sum;
  sum*=2;
  
  cout<<sum<<endl;
  
}