#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){

    while(true){
	int n;
	cin >> n;
	if(cin.eof()) break;

	int res = 0;
	bool flg = true;
	for(int i=2;i<=n;i++){
	    flg = true;
	    for(int j=2;j*j<=i;j++){
		if(i % j == 0){
                    flg = false;
                    break;
            }
	    }
	    if (flg) res++;
	}
	cout << res << endl;
    }

    return 0;
}