_dividers = function(n) {
  var arr = []
  for (var i = 1; i*i <= n; i++) {
     if (n % i === 0) {
       arr.push(i)
       if ( i != n / i) {
         arr.push(n / i)
       }
     }
  }
  return arr.sort((a, b) => a - b)
}

inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
N = inp.shift() * 1
cnt = 0
for (i=1; i<=N; i+=2) {
    if (_dividers(i).length == 8) {
        cnt++
    }
}
console.log(cnt)