#include<iostream>
#include<cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int prime(int x) {
    int ret = 0;
	for(int i = x; i > 1; i--) {
		int n = (int)sqrt(i);
		int yakusu = 0;
		for(int j = 1; j<=n; j++) {
			if(i%j==0) yakusu++;
		}
		if (yakusu==1) {
			ret++;
		}
	}
	return ret;
}

int main(){
    int x;
    while(cin>>x){
        cout << prime(x) << endl;
    }
  return 0;
}