#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>  using oset =
    tree<T, null_type, less<T>,
    rb_tree_tag, tree_order_statistics_node_update>;
#define odrkey order_of_key
#define fbodr find_by_order
#define ll long long
#define sq(a) ((a)*(a))
#define ull unsigned long long
#define all(x) (x).begin(),(x).end()
#define watch(x) cout << (#x) << " is " << (x) << endl
#define pi 3.1415926536
#define nwl cout << "\n"
#define sz 300000
ll Pow(ll a, ll b) {
    if(a==0) return 0LL;
	ll ans = 1;
	for (int i = 0; i < b; i++) {
		ans *= a;
	}
	return ans;
}
ll lcm(ll a, ll b) {
	return (a * b) / __gcd(a, b);
}
ll two_knights(ll  n) { // n>3
	ll ans = n * n * (n * n - 1);
	ans -= 8;
	ans -= 24;
	ans -= (n - 4) * 4 * 4;
	ans -= 16;
	ans -= (n - 4) * 6 * 4;
	ans -= (n - 4) * (n - 4) * 8;
	return ans / 2;
}
ll sm(ll n){
    return (n*(n+1))/2;
}
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    ll n;
    cin >> n;
    ll p=1;
    for(int i=2;i<sqrt(n)+1;(i>2 ? i+=2: i++)){
        ll cnt=0;
        while(n%i==0){
            cnt++;
            n/=i;
        }
        if(i%2==1)p*=(cnt+1);
    }
    if(n>1 && n%2) p*=2;
    cout << p*2 << endl;
}

#include <bits/stdc++.h>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define MOD 1000000007
typedef long long ll;
typedef pair<ll, ll> P;
int INF = 100000000;

int main()
{
  ll i, n, active = 0, ans = 0, n2, a, k;

  cin >> n;
  n2 = n * 2;
  auto solve = [&](ll k) 
  {
    ll tmp;
    tmp =n2 / k - k + 1;

    if (abs(tmp) % 2 == 0)
      ans++;
  };

  for (ll i = 1; i * i <= n2; i++)
  {
    if (n2 % i !=0 )
      continue;

    ll j = n2 / i;

    solve(i);
    solve(j);
  }

  cout << ans << endl;

  return 0;
}