function divisor(n) {var ret=[]; for (var i=1;i*i<=n;i++){if(n%i==0){ret.push(i);if(i*i!=n)ret.push(n/i);}}return ret;}
function main(input) {
  const inputs = input.split('\n');
  var n = parseInt(inputs[0], 10);

  var counter = 0;
  for (var i = 0; i <= n; i++) {
    counter += i % 2 == 1 && divisor(i).length == 8 ? 1 : 0;
  }
  console.log(counter);;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
