#include <bits/stdc++.h>
using namespace std;
#define task "SLNT"
bool p(long a)
{
	if (a<2) return false;
	if (a>2)
	{
		for (long i=2;i<=sqrt(i);i++)
		{
			if (a%i==0)
			{
				return false;
			}
			
		}
	}
	return true;
} 
int main()
{
    freopen(task".inp","r",stdin);
    freopen(task".out","w",stdout);
    long a,b,c,d=0;
    cin>>a;
    for (long i=1;i<a+1;i++)
    {
    	if (p(i)==true) 
		       d=d+1;
    }
	cout<<d;
}
