function Divisor(num) {
    var ret = 0;
    for (var p = 1; p <= num; p++) if (num % p == 0) ret++;
    return ret;
}
function Main(input) {
    var cnt = 0;
    N = Number(input);
    for (var i = 1; i <= N; i+=2) if (Divisor(i) == 8) cnt++;
    console.log(cnt);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));