function main(input){
	const n = parseInt(input, 10);
  	let count = 0;
  	for(i = 1; i <= n; i += 2){
      	if(for_for(i)){
        	count++;
        }
    }
  	console.log(count);
}

function for_for(intinp){
	for(i = 1; i < intinp; i++){
    	let counts = 0;
      	if(intinp % i === 0){
        	counts++;
          	if(counts === 7){
            	return true;
            }
        }
    }
  	return false;
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));