#include <iostream>
#include <cstdio>
using namespace std;

int main(int argc, char* argv[])
{
	int n;
	int judge(int s);
	while (scanf("%d",&n)!=EOF)
	{
	    int count=0; 
		for (int i=2;i<=n;i++)
		 {
		     if (judge(i)) count++;
		 }
		printf("%d\n",count);
	}
	return 0;
}
int judge(int s)
{
    for (int i=2;i<s;i++)
	{
	    if (s%i==0) return 0;
	}
	return true;
}