function Main(s){
  var n = +s;
  var ans = 0;
  for(var i = 1; i <= n; i += 2){
    var f = 0;
    for(var j = 1; j <= i; j++){
      if(i % j === 0)f++;
    }
    if(f === 8)ans++;
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin","utf8"));