#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>>
using namespace std;
std::vector<int> getAllDivisors(int n)
{
const int upper = sqrt(n);
std::vector<int> divisors;
divisors.reserve(30);
for (int i = 1; i <= upper; i++)
{
if (n % i == 0)
{
divisors.push_back(i);
if (n / i != i)
{
divisors.push_back(n / i);
}
}
}
return divisors;
}
int countDivisorsInRange(int n, int from, int to)
{
const int upper = sqrt(n);
int count = 0;
for (int i = 1; i <= upper; i++)
{
if (n%i == 0)
{
if (from <= i && i <= to)
{
++count;
}
const int propablyDivisor = n / i;
if (from <= propablyDivisor && propablyDivisor <= to && propablyDivisor != i)
{
++count;
}
}
}
return count;
}
int main()
{
ios::sync_with_stdio(false);
int n;
cin >> n;
int result = 0;
std::vector<int> nDivisors = getAllDivisors(n);
for (auto nDivisor : nDivisors)
{
int reminder = (n / nDivisor) - 1;
result += countDivisorsInRange(reminder, 2, reminder / 3);
}
cout << result << endl;
}