#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
using LL = long long;
constexpr int N = 2e5 + 5;
int n, m;
int isp[N];

void solve() {
    cin >> n;
    for (int i = 2; i <= n; ++i) {
        if (isp[i])continue;
        for (int j = 2 * i; j <= n; j += i)isp[j]++;
    }
    int res = 0;
    for (int i = 1; i <= n; ++i)if (isp[i] == 2)res++;
    cout << res << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);
    int tt = 1;
    //    cin >> tt;
    while (tt--) solve();
}