Problem: It's tough to be a superhero. And it's twice as tough to resist the supervillain who is cool at math. Suppose that you're an ordinary Batman in an ordinary city of Gotham. Your enemy Joker mined the building of the city administration and you only have several minutes to neutralize the charge. To do that you should enter the cancel code on the bomb control panel.

However, that mad man decided to give you a hint. This morning the mayor found a playing card under his pillow. There was a line written on the card:

<image>

The bomb has a note saying "J(x) = A", where A is some positive integer. You suspect that the cancel code is some integer x that meets the equation J(x) = A. Now in order to decide whether you should neutralize the bomb or run for your life, you've got to count how many distinct positive integers x meet this equation.

Input

The single line of the input contains a single integer A (1 ≤ A ≤ 1012).

Output

Print the number of solutions of the equation J(x) = A.

Examples

Input

3


Output

1


Input

24


Output

3

Note

Record x|n means that number n divides number x.

<image> is defined as the largest positive integer that divides both a and b.

In the first sample test the only suitable value of x is 2. Then J(2) = 1 + 2.

In the second sample test the following values of x match:

  * x = 14, J(14) = 1 + 2 + 7 + 14 = 24
  * x = 15, J(15) = 1 + 3 + 5 + 15 = 24
  * x = 23, J(23) = 1 + 23 = 24

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long A;
vector<pair<long long, int> > ls;
vector<long long> M2[100000];
vector<long long> ls2;
long long my_stp(long long first, int stp) {
  if (stp == 0) {
    return 1ll;
  }
  long long res = my_stp(first, stp / 2);
  res = res * res;
  if (stp & 1) {
    res = res * first;
  }
  return res;
}
pair<bool, long long> sqrtn(long long first, int stp) {
  long long t = (long long)pow((long double)first, (long double)1 / stp);
  for (long long k = max(2ll, t - 2); k <= t + 2; k++) {
    if (my_stp(k, stp) == first) {
      return make_pair(true, k);
    }
  }
  return make_pair(false, 0ll);
}
bool is_prime(long long first) {
  for (long long i = 2; i * i <= first; i++) {
    if (first % i == 0) return false;
  }
  return true;
}
void obr(long long term, int id) {
  if (term == 1) return;
  for (int i = 1; (1ll << i) <= term - 1; i++) {
    pair<bool, long long> sq = sqrtn(term - 1, i);
    if (sq.first && is_prime(sq.second)) {
      ls2.push_back(sq.second);
      M2[id].push_back(sq.second);
    }
  }
}
vector<long long> ls3;
void bct(int k, long long mul, int id) {
  if (k == (int)(ls).size()) {
    obr(mul, id);
    ls3[id] = mul;
    return;
  }
  for (int j = 0; j <= ls[k].second; j++) {
    bct(k + 1, mul, id * (ls[k].second + 1) + j);
    mul *= ls[k].first;
  }
}
vector<pair<int, int> > G[100000];
void bct2(int k, int mul1, int mul2) {
  if (k == (int)(ls).size()) {
    if (mul2 != mul1) G[mul1].push_back(make_pair(mul2 - mul1, mul2));
    return;
  }
  for (int j = 0; j <= ls[k].second; j++) {
    for (int j1 = j; j1 <= ls[k].second; j1++) {
      bct2(k + 1, mul1 * (ls[k].second + 1) + j,
           mul2 * (ls[k].second + 1) + j1);
    }
  }
}
int main() {
  cin >> A;
  long long cur = A;
  for (long long i = 2; i * i <= cur; i++) {
    int cnt = 0;
    while (cur % i == 0) {
      cnt++;
      cur /= i;
    }
    if (cnt) {
      ls.push_back(make_pair(i, cnt));
    }
  }
  if (cur > 1) {
    ls.push_back(make_pair(cur, 1));
  }
  int szls3 = 1;
  for (auto first : ls) {
    szls3 *= (first.second + 1);
  }
  ls3.resize(szls3);
  bct(0, (long long)1, 0);
  {
    sort((ls2).begin(), (ls2).end()),
        ls2.resize(unique((ls2).begin(), (ls2).end()) - ls2.begin());
  };
  bct2(0, 0, 0);
  vector<vector<long long> > DP((int)(ls3).size(),
                                vector<long long>((int)(ls2).size() + 1, 0));
  DP[0][0] = 1;
  for (int first = 0; first < (int)(ls3).size(); first++) {
    for (auto& second : M2[first]) {
      second = lower_bound((ls2).begin(), (ls2).end(), second) - ls2.begin();
    }
  }
  for (int i = 0; i < (int)(ls3).size(); i++) {
    for (int j = 0; j < (int)(ls2).size(); j++) {
      DP[i][j + 1] += DP[i][j];
    }
    for (auto first : G[i]) {
      for (int second : M2[first.first]) {
        DP[first.second][second + 1] += DP[i][second];
      }
    }
  }
  cout << DP[(int)(ls3).size() - 1][(int)(ls2).size()] << endl;
  return 0;
}