#include <iostream>
#include <cmath>
using namespace std;
bool isprime(int& num)
{
    static int c;
    for(c=2; c < sqrt(num)+1; c++)
        if(num % c ==0) return false;
    return true;
}

int main()
{
    int ans = 0;
    int buff;
    while(cin >> buff);
    {
        for(int d =2; d <= buff; d++)
            if(isprime(d)) ans++;
        cout << ans << " ";
        ans  = 0;
    }
    cout << endl;
    return 0;
}