#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
	int n;

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

		for (int i = 2; i <= n; i++) {
			int kari = 1;
			for (int j = 2; j < i; j++) {
				kari = i % j;
				if(kari == 0) {
					break;
				}
			} if (kari != 0) {
				counter++;
			}
		}
		cout << counter << endl;
	}

	return 0;
}