#include<cstdio>
using namespace std;
int main()
{
	int n;
	scanf("%d",&n);
	int ans=0;
	for(int i=105;i<=n;i+=2){
			int an=0;
		for(int j=1;j<=i;j++){
			if(i%j==0)
					an++;
		}
			if(an>=8)
				ans++;
	}
	printf("%d\n",ans);
	return 0;
}
