#include <iostream>
using namespace std;
int main() {
	int n, count = 0;
	while(cin >> n) {
		for(int i = 2; i < n + 1; i++) {
			count++;
			for(int j = 2; j <= i / 2; j++) {
				if(i % j == 0) {
					count--;
					break;
				}
			}
		}
		cout << count << endl;
		count = 0;
	}

	return 0;
}