#include<bits/stdc++.h>
#define LL long long
using namespace std;
LL n,ans;
int main()
{
	cin>>n;
	n*=2;
	for(LL i=1;i*i<=n;i++)
	{
		if(n%i==0)
		{
			LL a=i,b=n/i;
			if(a%2!=b%2)ans+=2;
		}
	}
	cout<<ans;
	return 0;
}

#include<iostream>
#include<iterator>
#include<algorithm>
#include<climits>
#include<map>
#include<set>
#include<cmath>
#include<numeric>
#include<string>
#include<sstream>
#include<cstdio>
#include<vector>
#include<bitset>
// #include <atcoder/segtree>
#define ll long long
using namespace std;


int main()
{
    ll n,s,c=0;
    cin >> n;
    s = (ll)sqrt(n);
    for(ll i = 1; i <= s; ++i){
        ll cp = n/i;
        if(n%i==0){
            if(i%2==1){
                c++;
            }
            if (cp%2==1){
                if (cp!=i)c++;
            }
        }
    }
    cout<<(2*c)<<endl;
}