#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; constexpr ll INF = 1e18; inline ll satulating_pow(ll a, int n) { ll cur = 1; rep(_, n) { if (cur > INF / a) return INF; cur *= a; } return cur; } int main() { cin.tie(nullptr)->sync_with_stdio(false); vector primes; { constexpr int m = 3.5e6; vector isPrime(m, true); for (int i = 2; i < m; ++i) { if (isPrime[i]) { primes.push_back(i); for (ll j = (ll) i * i; j < m; j += i) isPrime[j] = false; } } } int n; cin >> n; int ans = 0; function dfs = [&](int idx, int cnt, ll cur) { if (cnt == 4) { assert(cur <= n); ans++; return; } for (int i = idx + 1; i < primes.size(); ++i) { if (satulating_pow(primes[i], 4 - cnt) > n / cur) break; dfs(i, cnt + 1, cur * primes[i]); } }; dfs(-1, 0, 1); cout << ans << '\n'; return 0; }