#include<cstdio>

int n,ans;

int main()
{
	scanf("%d",&n);
	for(int i=1; i<=n; i++)
	{
		int tmp=0;
		for(int j=1; j<=i; j++)if(i%j==0)tmp++;
		if(tmp==8&&i&1)ans++;
	}
	printf("%d",ans);
	return 0;
}