#include using namespace std; using ll = long long; vector factor; void all_factor(ll n){ factor.clear(); for (ll i = 1; i*i <= n; i++){ if (n % i == 0){ factor.push_back(i); if (i*i != n) factor.push_back(n / i); } } } int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int N; cin >> N; all_factor(N); cout << N-factor.size() << endl; return 0; }