#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <stdio.h>

using namespace std;

int main()
{
	int n,ans,flag;

	while(scanf("%d",&n)!=EOF){
		ans=0; 
		for(int i=2;i<=n;i++){
			flag=1;
			for(int j=2;j*j<=i;j++){
				if(i%j==0) {flag=0;break;}
			}
			if(flag) ans++;
		}
		cout<<ans<<endl;
	}

	return 0;
}