function main(input) {
  var answer = 0;

  for (var i = 1; i <= input; i++) {
    var counter = 0;
    for (var j = 1; j <= i; j++) {
     if(i % j == 0) {
      counter++;
     }
    }
    if (counter == 8) {
      answer++;
    }
  }

  console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));