"use strict"

function main(input) {
  input = ~~input

  let total = 0
  for (let i = input; i > 0; i -= 2) {
    let cnt = 0
    for (let j = 1; j <= i; j++) {
      cnt += i % j == 0 ? 1 : 0
    }
    total += cnt == 8 ? 1 : 0
  }
  console.log(total)
}
main(require("fs").readFileSync("/dev/stdin", "utf8"))