#include<iostream>
using namespace std;
#define L long long int
int main(){
int n,ans,i,j;
while(cin>>n){
	ans=0;
	for(i=2;i<=n;i++){//search for 2 to n
		for(j=2;j<=i;j++)if(i%j==0)break;
		if(j==i)ans++;
	}
	cout<<ans<<endl;
}
return 0;
}