#include <stdio.h>

int main(void)
{
	int i;
	int  n; //入力された自然数
	int prime[10000];
	int j = 0;
	int counter = 0;

	prime[j++] = 2;
	prime[j++] = 3;
	
	scanf("%d"&n);

	for (n = 5; n <= 100000000; n += 2) {
		for (i = 1; i < j; i++) {
			if (n % prime[i] == 0)
				break;
			
		}
		if (j == i)
			prime[j++] = n;
	}
	for (i = 0; i < j; i++)
		counter++;
printf("%d", counter);

	return(0);

}
