let N = Int(readLine()!)!
if N < 105 {
  	print(0)
} else {
  	var ans = 1
    for i in 107.stride(to: N+1, by: 2) {
        var cnt = 0
        for j in 3.stride(to: i, by: 2) {
            if i % j == 0 {
                cnt += 1
            }
        }
        if cnt == 6 {
            ans += 1
        }
    }
  	print(ans)
}
