#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <cstring>
using namespace std;
bool primenum(int a)
{
    int i;
    int s;
    s=(int)sqrt(a)+1;
    if(a==2) return true;
    for(i=2;i<=s;i++)
    {
        if(a%i==0)
        {
            break;
        }
    }
    if(i==s+1)
    {
        return true;
    }
    else
        return false;
}
int main()  
{  
    int n;
    while(cin>>n)
    {

    
        int counter=0;
        for(int j=2;j<=n;j++)
        {
            if(primenum(j))
            {
                counter++;
            }
            
        }
        cout<<counter<<endl;
    }
    //system("pause");
    return 0;
}  

