#include<iostream>
using namespace std;

int main(){
	int n;
	while(cin >> n && n<1000000) {
		int s = 0;
			for (int j = 2;j <= n;j++){
				int yaku = 0;
				for (int m = 1;m <= j;m++){
					if (j % m == 0) yaku++;
				}
				if (yaku == 2) s++;
			}
			cout << s << endl;
	}
    return 0;
}