#include<iostream>
#include<sstream>
#include<iomanip>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
#include<string>
#include<numeric>
#include<queue>


#define rep(i,p) for(long long int i=0;i<p;i++)
#define reep(i,p) for(long long int i=1;i<=p;i++)
#define ll long long
#define mod 1000000007

using namespace std;

int main(){

ll int N;
cin >> N;

if(N==1){
	cout << "2";
	return 0;
}

ll int  n;
ll int karii=0;
ll int counter=0;
for(ll int i=1;i<=100000000;i++){

	if((i*i-i)%2==0){
		n=N-(i*i-i)/2;
		if(n<=0){
			break;
		}
		if(n%i==0){
			//	cout << n << endl;
			if(n==floor(n)){
				counter+=2;
				
		//		cout << "dfd"<< i-karii << endl;
				karii=i;

			}
		}
	}
	
}
cout << counter;










	return 0;

}



// Problem: D - Staircase Sequences
// Contest: AtCoder - AtCoder Beginner Contest 190
// URL: https://atcoder.jp/contests/abc190/tasks/abc190_d
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1e9+7
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define pb push_back
#define ff first
#define ss second

int main() {
	fast;
	ll t=1;
	// cin>>t;
	while(t--){
		ll n;
		cin>>n;
		ll ans=0;
		for(ll i=2;i*(i+1)/2<=n;i++) if((n-i*(i+1)/2)%i==0)	ans++;
		cout<<2*(ans+1)<<"\n";
	}
	return 0;
}




