#include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	int n,cnt=0;
	while(cin >> n){
		for(int i=1;i<=n;i+=2){
			int k=0;
			for(int j=3;j<=(int)sqrt((double)i);j+=2){
				if(i%j==0){
					k=1;
					break;
				}
			}
			if(k==0){
				cnt++;
			}
		}
		cout << cnt << endl;
		cnt=0;
	}
}