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

template <class Tp, class Comp = std::less<Tp>>
bool chle(Tp &x, const Tp &y, Comp comp = Comp()) {
  return comp(y, x) ? x = y, true : false;
}

template <class Tp, class Comp = std::less<Tp>>
bool chge(Tp &x, const Tp &y, Comp comp = Comp()) {
  return comp(x, y) ? x = y, true : false;
}

void solve() {
  i64 n;
  cin >> n;
  while (~n & 1) {
    n >>= 1;
  }
  i64 ans = 0;
  for (i64 d = 1; d * d <= n; ++d) {
    if (n % d) {
      continue;
    }
    ans++;
    if (d < n / d) {
      ++ans;
    }
  }
  ans += ans;
  cout << ans << "\n";
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  solve();
}

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

typedef long long ll;

int main()
{
    ll n;
    scanf("%lld", &n);

    ll cnt = 0;
    for(ll i = 1; i * i <= n; i++)
    {
        if(n % i == 0)
        {
            if(i % 2 == 1 )
                cnt++;
            if(i != n / i && (n / i) % 2 == 1)
                cnt++;
        }
    }
    printf("%lld\n", cnt * 2);

    return 0;
}