#include<iostream>
using namespace std;

int main(){
	int n;
	int count=0;
	int prime_num=0;
	while(cin >> n){
		for(int i=1;i <=n;i++){
			count = 0;
			 for(int j=1;j<=i;j++){
				if(i%j == 0) count ++;
			 }
			 if(count == 2) prime_num++;
		}
		cout << prime_num << endl;
		prime_num = 0;
	}
}