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

using namespace std;

int main()
{
	int p[10000];
	int c=0,flag,n;
	long long ans;

	p[c++]=2;p[c++]=3;p[c++]=5;

	for(int i=7;i*i<999999;i++){
		flag=1;
		for(int j=0;j<c;j++){
			if(i%p[j]==0){flag=0;break;}
		}
		if(flag) p[c++]=i;
	}

	while(scanf("%d",&n)!=EOF){
		ans=0;
		for(int i=0;p[i]<=n;i++) ans++;
		cout<<ans<<endl;
	}


	return 0;
}