#include<bits/stdc++.h>
#define inf INT_MAX
#define sc(a) scanf("%d",&a)
#define scc(a,b) scanf("%d %d",&a,&b)
#define sccc(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define lsc(a) scanf("%lld",&a)
#define lscc(a,b) scanf("%lld %lld",&a,&b)
#define lsccc(a,b,c) scanf("%lld %lld %lld",&a,&b,&c)
#define pf(a) printf("%d",a)
#define pff(a,b) printf("%d %d",a,b)
#define pfff(a,b,c) printf("%d %d %d",a,b,c)
#define pb(a) push_back(a)
#define em empty()
#define fr front()
#define cl clear()
#define sz size()
#define mp(a,b) make_pair(a,b)
#define fri(b) freopen(b,"r",stdin)
#define fro(b) freopen(b,"w",stdout)
 
 
using namespace std;
 
 
 
 
int main(){
	//fri("gir.txt");
	//fro("cik.txt");
	long long n;
	lsc(n);
	long long n2=2*n;
	long long bas=0;
	while(n%2==0){
		n/=2;
	}
	long long kok=(long long)sqrt(n);
	for(long long i=1;i<=kok;i+=2){
		if(n%i==0){
			bas+=2;
			if(n/i==kok){
				bas--;
			}	
		}		
	}
	cout<<2*bas<<endl;
 
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    long long N;
    cin >> N;
    N *= 2;
    long long count = 0;
    for (long long i = 1; i * i <= N; ++i) {
        if (N % i == 0) {
            long long j = N / i;
            if (i % 2 != j % 2) {
                count += 2;
            }
        }
    }
    cout << count << '\n';
    return 0;
}