#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll>vl1;
typedef vector<vl1> vl2;

vl1 veka(11);
vl1 niz(11);
vl1 kata(11);
vl1 hepa(11);

struct struka
{ll val; ll ind;};
typedef vector<struka> vs;
vs sutra(11);

bool compa(struka& a, struka& b)
{ if(a.val==b.val) return a.ind<b.ind;
  return a.val<b.val;
}

int main()
{ ll i, j, k, kn, m, n, p, t, r, x, y, z, a, b, c, kom;
  ll val, pos, tmp, suma, maxa, mina, naso, num;
  string str1;
  char ch1;

  cin>>n;
  if(n==2) {cout<<2; return 0;}
  suma=2;

  for(i=2;i<=n;i++)
   { kom=(i*(i+1))>>1;
     val=n-kom;
     if(val<0) break;

     tmp=val/i;
     if(val==tmp*i) suma+=2;

   }
  cout<<suma;

  return 0;
}
/*

*/

#include<bits/stdc++.h>
using namespace std;
using ll=int64_t;

int main(){
  ll N; cin>>N;
  ll idx=sqrt(2*N);
  list<pair<ll, ll> > num;
  for(int i=1; i<=idx; i++){
    if(((2*N)%i)==0){
      ll j=(2*N)/i;
      ll base= i-j+1;
      if(base%2==0){
        if(j-1>=0) num.push_back({base/2, j-1});
        if(i-1>=0) num.push_back({(-base+2)/2, i-1});
        if(-j-1>=0) num.push_back({(-base+2)/2, -j-1});
        if(-i-1>=0) num.push_back({base/2, -i-1});
      }
    }
  }
  cout<<num.size()<<endl;
  return 0;
}
