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

long long N;

vector<long long> divisor(long long n) {
  vector<long long> res;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i) {
        res.push_back(n / i);
      }
    }
  }
  return res;
}

bool check(long long l) {
  long long v = 2 * N / l - l + 1;
  if (abs(v) % 2 == 0) {
    return true;
  } else {
    return false;
  }
}

int main() {

  cin >> N;

  int ans = 0;
  vector<long long> L = divisor(N);

  for (long long i = 0; i < int(L.size()); ++i) {
    if (check(L[i])) {
      ans++;
    }
    long long l2 = N * 2 / L[i];
    if (i != l2) {
      if (check(l2)) {
        ans++;
      }
    }
  }

  cout << ans << endl;

  return 0;

}
#include<iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
using namespace std;

//int N=1;
int P[11] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
int binary(int bina) {
	int ans = 0;
	for (int i = 0; bina > 0; i++)
	{
		ans = ans + (bina % 2) * pow(10, i);
		bina = bina / 2;
	}
	return ans;
}
int rev(int original)
{
	int reversed = 0;

	while (original > 0) {
		reversed = original % 10 + reversed * 10;
		original = original / 10;
	}
	return reversed;
}

int main() {
	int n, cou = 0;
	cin >> n;
	for (int i = 0;i < 10;i++) {
		if (n % 10 == 0) {
			n /= 10;
		}
		else {
			break;
		}
	}
	if (n == rev(n)) cout << "Yes";
	else cout << "No";
	
}