#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>

using namespace std;


int main(){
	int n;
	int i,j;

	while(cin >> n){
		int count = 0;

		for(i=2 ; i<n+1 ; i++){
			j=1;
			while(1){
				j++;
				if((i%j)==0)break;
			}
			if(i == j) count++;
		}

		cout << count << endl;
	}
	return 0;
}