#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,ans=0,tmp;
	cin>>n;
	for(int i=105;i<=n;i+=2){
		tmp=0;
		for(int j=1;j<=n;j+=2)if(i%j==0)tmp++;
		if(tmp==8)ans++;
	}
	cout<<ans;
	return 0;
}