#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<string>
using namespace std;



bool primeJudge(int num) {
	if (num == 1)return false;
	if (num == 2)return true;

	for (int i = 2; i * i <= num; i++) {
		if (num % i == 0)return false;
	}
	return true;
}

int main() {
	
	int n;
	int count;
	while (cin >> n) {
		count = 0;
		for (int i = 1; i <= n; i++) {
			if (primeJudge(i)) {
				count++;
			}
		}

		printf("%d\n", count);

	}

	//system("pause");
	return 0;
}
