function main(lines) {
    const input = lines.split('\n').map(Number)[0]
    var count = 0
    for(var i=1; i<=input; i+=2){
        // if(input%i === 0){
            var tmpCount = 0;
            // console.log(i)
            for(var k=1; k<=i; k++){
                if(i%k === 0){
                    tmpCount++
                }
            }
            if(tmpCount === 8){
                count++
            }
        // }
    }
    console.log(count)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
