#include using namespace std; using ll = long long; template using min_priority_queue = priority_queue, greater>; using pii = pair; using pll = pair; using Graph = vector>; const ll INF = 1LL << 60; template void chmax(T& a, T b) { if (b > a) a = b; } template void chmin(T& a, T b) { if (b < a) a = b; } template std::ostream& operator<<(std::ostream& os, const pair& x) noexcept { return os << "(" << x.first << ", " << x.second << ")"; } template void print_vector(vector a) { cout << '['; for (int i = 0; i < a.size(); i++) { cout << a[i]; if (i != a.size() - 1) { cout << ", "; } } cout << ']' << endl; } ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; } ll lcm(ll x, ll y) { return x / gcd(x, y) * y; } ll ceilll(ll x, ll y) { return (x + y - 1) / y; } ll mod(ll x, ll y) { return (x + 10000000) % y; } // 約数全列挙 vector all_divisors(ll K) { vector ret; for (ll i = 1; i * i <= K; i++) { if (K % i != 0) continue; ret.push_back(i); if (i * i != K) ret.push_back(K / i); } return ret; } // 素因数分解 vector> prime_factorize(ll N) { vector> res; for (ll a = 2; a * a <= N; ++a) { if (N % a != 0) continue; ll ex = 0; while (N % a == 0) { ++ex; N /= a; } res.push_back({a, ex}); } if (N != 1) res.push_back({N, 1}); return res; } void solve() { ll N; cin >> N; auto ds = all_divisors(N); std::cout << N - ds.size() << "\n"; } int main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); int T = 1; while (T--) { solve(); } return 0; }