#include<stdio.h>
#include<math.h>
int judge(int x)
{
	for (int i = 3; i < sqrt(x) + 1; i++)
		if (x%i == 0)
			return 0;
	return 1;
}
int main()
{
	int a, num;
	while (scanf("%d", &a) != EOF)
	{
		num = 1;
		if (a < 2)
			num = 0;
		for (int i = 3; i <= a; i+=2)
			if (judge(i))
				num++;
		printf("%d\n", num);
	}
	return 0;
}