#include <stdio.h>

int main(void)
{
	int n;
	int i;
	int flag;
	int ans;
	
	while (scanf("%d", &n) != EOF){
		
		ans = 0;
		while (n >= 2){
			flag = 0;
			for (i = n - 1; i >= 2; i--){
				if (n % i == 0){
					flag = 1;
				}
			}
			
			if (flag == 0){
				ans++;
			}
			
			n--;
		}
		printf("%d\n", ans);
	}
	
	return (0);
}