#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) x.begin(), x.end()
const int N = 1e6 + 5;
bool checkPrime(ll n)
{
if(n == 2 || n == 3) return true;
if(n < 2 || n%2 == 0 || n%3 == 0) return false;
for(int i = 5; 1ll*i*i <= n; i+=6){
if(n%i == 0 || n%(i+2) == 0) return false;
}
return true;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
ll n, cnt = 0;
cin>>n;
for(int i=1;i<=sqrt(n);++i){
if(n%i==0){
if(!checkPrime(i)) cnt++;
if(n/i != i){
if(!checkPrime(n/i)) cnt++;
}
}
}
cout<<cnt;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBsbCBsb25nIGxvbmcKI2RlZmluZSBhbGwoeCkgeC5iZWdpbigpLCB4LmVuZCgpCmNvbnN0IGludCBOID0gMWU2ICsgNTsKYm9vbCBjaGVja1ByaW1lKGxsIG4pCnsKICAgIGlmKG4gPT0gMiB8fCBuID09IDMpIHJldHVybiB0cnVlOwogICAgaWYobiA8IDIgfHwgbiUyID09IDAgfHwgbiUzID09IDApIHJldHVybiBmYWxzZTsKICAgIGZvcihpbnQgaSA9IDU7IDFsbCppKmkgPD0gbjsgaSs9Nil7CiAgICAgICAgaWYobiVpID09IDAgfHwgbiUoaSsyKSA9PSAwKSByZXR1cm4gZmFsc2U7CiAgICB9CiAgICByZXR1cm4gdHJ1ZTsKfQppbnQgbWFpbigpIHsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZShOVUxMKTsgY291dC50aWUoTlVMTCk7CiAgICBsbCBuLCBjbnQgPSAwOwogICAgY2luPj5uOwogICAgZm9yKGludCBpPTE7aTw9c3FydChuKTsrK2kpewogICAgICAgIGlmKG4laT09MCl7CiAgICAgICAgICAgIGlmKCFjaGVja1ByaW1lKGkpKSBjbnQrKzsKICAgICAgICAgICAgaWYobi9pICE9IGkpewogICAgICAgICAgICAgICAgaWYoIWNoZWNrUHJpbWUobi9pKSkgY250Kys7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBjb3V0PDxjbnQ7Cn0K