#include <iostream>
using namespace std;
int main(){
	int N,count=0,ans=0;
	cin>>N;
	for(int i=1;i<=N;i++){
		for(int j=1;j<=i;j++){
			if(i%j==0){
				count++;
			}
		}
		if(i%2==1&&count==8){
			ans++;
		}
		count=0;
	}
	cout<<ans<<endl;
}
