#include #include using namespace std; using ll = long long; using ld = long double; using pii = pair; using pll = pair; using vi = vector; #define pb push_back #define eb emplace_back #define fi first #define se second #define all(x) begin (x), end(x) #define sz(x) (int) (x).size() #define rep(i,a,b) for (int i = (a); i < (b); i++) mt19937 rng(random_device{}()); using i128 = __int128; using ull = unsigned long long; using u128 = __uint128_t; ull modMul(ull a, ull b, ull mod) { return (u128)a * b % mod;} bool checkPrime(ll p, ll a) { ll k = p - 1, d = 1; while (~k & 1) k >>= 1; for (ll e = k; e; e >>= 1) { if (e & 1) d = i128(d) * a % p; a = i128(a) * a % p; } if (d == 1 || d == p - 1) return true; while ((k <<= 1) < p - 1) { d = i128(d) * d % p; if (d == p - 1) return true; } return false; } // d5cf5e bool isPrime(ll p) { if (p == 1) return false; for (int i: {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37}){ if (p == i) return true; if (!checkPrime(p, i)) return false; } return true; } // a137c8 int main(){ ios::sync_with_stdio(false); cin.tie(0); unsigned long long n; unsigned long long num = 1; cin >> n; ll index = 2; ll quant = 0; while(num <= n){ if(isPrime(index)){ num = num * index; if(num <= n){ quant++; } } index++; } cout << quant << endl; return 0; }