#pragma region Macros #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define OVERLOAD(e1, e2, e3, e4, NAME, ...) NAME #define _rep1(i, n) for (long long i = 0; i < n; i++) #define _rep2(i, a, b) for (long long i = a; i < b; ++i) #define _rep3(i, a, b, t) \ for (long long i = a; i * (t / abs(t)) < b * (t / abs(t)); i += t) #define rep(...) OVERLOAD(__VA_ARGS__, _rep3, _rep2, _rep1, _)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define sz(x) (int)x.size() #define fi first #define se second #define pb push_back #define eb emplace_back #define mp make_pair #define pcnt __builtin_popcountll #define SORT(v) sort(all(v)) #define UNIQUE(v) \ SORT(v); \ v.erase(unique(v.begin(), v.end()), v.end()); #define COPY(A, B) copy(all(A), B.begin()); #define REV(v) reverse(all(v)) #define MAX(x) *max_element(all(x)) #define MIN(x) *min_element(all(x)) #ifdef LOCAL #define dbg(x) \ { \ cout << __LINE__ << " : " << #x << " = "; \ print(x); \ } #define IS_LOCAL true #else #define dbg(x) true #define IS_LOCAL false #endif using namespace std; template using vc = vector; template using vvc = vector>; template using vvvc = vector>; template bool chmin(T& k, T m) { bool ret = k > m; k = min(k, m); return ret; } template bool chmax(T& k, T m) { bool ret = k < m; k = max(k, m); return ret; } template inline void print(const vector& v, string s = " ") { for (int i = 0; i < (int)v.size(); i++) cout << v[i] << (i != (int)v.size() - 1 ? s : ""); cout << "\n"; } template inline void print(const pair& p) { cout << p.first << " " << p.second << endl; } template inline void print(const T& x) { cout << x << "\n"; } template inline void print(const vector>& v) { for (auto&& p : v) print(p); } void yes(bool a) { cout << (a ? "yes" : "no") << endl; } void YES(bool a) { cout << (a ? "YES" : "NO") << endl; } void Yes(bool a) { cout << (a ? "Yes" : "No") << endl; } template T SUM(vc As) { T ret = 0; for (T a : As) ret += a; return ret; } #pragma endregion const ll INF = numeric_limits::max(); vector make_divisors(ll n) { vector ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(begin(ret), end(ret)); return (ret); } void solve() { ll N; cin >> N; print(N - sz(make_divisors(N))); } int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15); // ll T; cin >> T; // rep(_, T) solve(); }