import scala.io.StdIn

object Main{
	def main(args: Array[String]): Unit = {

		val N = StdIn.readLine.toInt

		val result: Int =
			(1 to N).filter( _ % 2 == 1)
				      .count( num => diviserNum(num) == 8)
		println(result)
	}

	def log(base: Int)(trueVal: Int): Int = {
		var i = 0
		var trueVar = trueVal

		while( trueVar % base == 0 ) {
			i = i + 1
			trueVar = trueVar / base
		}
		i
	}

	def diviserNum(N: Int): Int = {
		val inclusive = 2 to (Math.sqrt(N).toInt + 1)
		var Nvar = N

		val resultList = inclusive.map { num =>
			val result_i = log(num)(Nvar)
			Nvar = Nvar / Math.pow(num.toDouble, result_i.toDouble).toInt
			result_i
		}
		val result =
			resultList.filter(_ > 0).foldLeft(1) { (rs, num) =>
				rs * (num + 1)
			}
		result
	}
}