#include <bits/stdc++.h>
using namespace std;
int pt(int n)
{
int i,j,d,res = 1;
for (i = 2;i <= trunc(sqrt(n));i++)
if (n % i == 0)
{
d = 0;
while (n % i == 0)
{
n /= i;
d++;
}
res *= (1 + d);
}
if (n != 1) res *= 2;
return res;
}
int main()
{
int i,n,d = 0;
cin >> n;
for (i = 1;i <= trunc(sqrt(n));i++)
if (n % i == 0)
{
if (pt(i) == 4) d++;
if (i != n / i && pt(n / i) == 4) d++;
}
cout << d;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBwdChpbnQgbikKewogICAgaW50IGksaixkLHJlcyA9IDE7CiAgICBmb3IgKGkgPSAyO2kgPD0gdHJ1bmMoc3FydChuKSk7aSsrKQogICAgaWYgKG4gJSBpID09IDApCiAgICB7CiAgICAgICAgZCA9IDA7CiAgICAgICAgd2hpbGUgKG4gJSBpID09IDApCiAgICAgICAgewogICAgICAgICAgICBuIC89IGk7CiAgICAgICAgICAgIGQrKzsKICAgICAgICB9CiAgICAgICAgcmVzICo9ICgxICsgZCk7CiAgICB9CiAgICBpZiAobiAhPSAxKSByZXMgKj0gMjsKICAgIHJldHVybiByZXM7Cn0KaW50IG1haW4oKQp7CiAgICBpbnQgaSxuLGQgPSAwOwogICAgY2luID4+IG47CiAgICBmb3IgKGkgPSAxO2kgPD0gdHJ1bmMoc3FydChuKSk7aSsrKQogICAgaWYgKG4gJSBpID09IDApCiAgICB7CiAgICAgICAgaWYgKHB0KGkpID09IDQpIGQrKzsKICAgICAgICBpZiAoaSAhPSBuIC8gaSAmJiBwdChuIC8gaSkgPT0gNCkgZCsrOwogICAgfQogICAgY291dCA8PCBkOwogICAgcmV0dXJuIDA7Cn0K