'use strict';
console.log(function(args){
  const N = args.trim()|0;
  let count = 0;
  for ( let i = 1; i <= N; i=i+2 ) {
    let divisor = 0;
    for ( let j = 1; j <= i; j++ ) {
      if ( i % j === 0 && ++divisor > 8 ) break;
    }
    if ( divisor === 8 ) count++;
  }
  return count.toString();
}(require('fs').readFileSync('/dev/stdin', 'utf8')));