#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define faster ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define read freopen("in.txt", "r", stdin)
#define write freopen("out.txt", "w", stdout)
#define mem(x, n) memset(x, n, sizeof(x))
#define all(x) x.begin(), x.end()
#define endl "\n"

ll sum(ll n)
{
  return n * (n + 1) / 2;
}

ll rangeSum(ll a, ll b)
{
  return sum(b) - sum(a - 1);
}

int main()
{
  faster;

  ll n, cnt = 0;
  cin >> n;

  for (ll len = 1; len <= 2e6; len++)
  {

    ll l = 1, r = 1e12;

    while (l <= r)
    {
      ll mid = l + (r - l) / 2;
      if (rangeSum(mid, mid + len - 1) == n)
      {
        cnt += 2;
        break;
      }
      else if (rangeSum(mid, mid + len - 1) < n)
        l = mid + 1;
      else
        r = mid - 1;
    }
  }

  cout << cnt << endl;

  return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  ll n;
  cin >> n;
  n *= 2;
  int ans = 0;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ll j = n / i;
      if (i % 2 != j % 2) ans += 2;
    }
  }
  cout << ans << endl;
  return 0;
}
