#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;


int main()
{
	int i,j,n,flag,number=0;
	
	while(cin>>n){
		number=0;
	for(j=2;j<=n;j++){
		flag=0;
		for(i=2;i<j-1;i++)
		{
		if(j%i==0)flag=1;
		}
		if(flag!=1)number++;
		
	}
	cout<< number << endl;
	}
	//cout<< number << endl;
	return (0);
}