#include<cstdio>
int main(void)
{
	int N,ans=0;
	scanf("%d",&N);
	int a=105;
	int b=135;
	int c=165;
	int d=189;
	int e=195;
	
	if(N>=a)ans++;
	if(N>=b)ans++;
	if(N>=c)ans++;
	if(N>=d)ans++;
	if(N>=e)ans++;
	printf("%d\n",ans);
	return 0;
}
