object Main extends App{
    val n = scala.io.StdIn.readInt
    var tp = 0
    var ans = 0

    for(i<-1 to n by 2){
    	tp = 0
    	for(j<-1 to i){
    		if(i%j == 0){
    			tp += 1
    		}
    	}

    	if(tp == 8){
    		ans += 1
    	}
    }

    println(ans)
}
