function Main(input) {
  input = input.trim();
  var N = parseInt(input, 10);
  var ans = 0;
  t = new Array(N + 1).fill(0);
  for (var i = 0; i <= N; i++) {
    if (i % 2 == 0) continue;
    var bias = i;
    while (true) {
      if (N < bias) break;
      if (bias % 2 == 1) t[bias] += 1;
      bias += i;
    }
  }
  t.map((n) => {
    if (n == 8) {
      ans++;
    }
  });
  console.log(ans);
}

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