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

int main()
{
	int n,i,j,count,pnum;
	while(scanf("%d",&n)!=EOF){
		count=0;
		pnum=0;
		
		
		for(i=n; i>=1; i--){
			for(j=1; j<=i; j++){
				if(i%j==0) count++;
			}
			if(count==2) pnum++;
			count=0;
		}
		cout << pnum << endl;
	}
	
	return 0;
}