object Main extends App{

val n = scala.io.StdIn.readInt

var cnt = 0
for (i <- 1 to n) {
  if (i%2 != 0){
      var yakusuu = 0
      for (j <- 1 to i){
        if (i % j == 0) yakusuu += 1
        // 8を超えたらbreakしたい
      }
      if (yakusuu == 8){
        cnt += 1
      }
  }
}

println(cnt)
}