#include using namespace std; using namespace chrono; #if __has_include() #include using namespace atcoder; #endif int main() { int64_t n; cin >> n; int64_t ans = n; for (int64_t i = 1; i * i <= n; i++) { if (n % i == 0) { ans--; if (i != n / i) { ans--; } } } cout << ans << endl; return 0; }