#include <bits/stdc++.h>
using namespace std;
#define LL long long
vector<int> prime;
void find_prime(int n) {
vector<int> lp(n, 0);
for (int i = 2; i <= n; i++) {
if (lp[i] == 0) { lp[i] = i; prime.push_back(i); }
for (int j = 0; i * prime[j] <= n; j++) {
lp[i * prime[j]] = prime[j];
if (prime[j] == lp[i]) break; } } return;
}
LL n;
LL ans = 0;
f(LL sum, LL num, int pl) {
ans++;
//cout << "num=" << num << endl;
for (int i = pl; i < prime.size(); i++) {
if (prime[i] * num > n || sum + 1 < prime[i]) break;
LL tmp = prime[i];
LL add = 1 + prime[i];
while (tmp * num <= n) {
f(min((LL)1e7, sum * add), tmp * num, i + 1);
tmp *= prime[i];
add += tmp;
add = min(add, (LL)1e7);
}
}
}
void solve() {
cin >> n;
f(1, 1, 0); // prime[0] = 2
cout << ans << "\n";
return;
}
int main() {
ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
cout << fixed << setprecision(10);
find_prime(3e6);
solve();
return 0;
}