val primes = listOf(3, 5, 7, 11, 13)

fun main(args: Array<String>) {
    val N = readInputLine().toInt()
    
    var nums = mutableListOf<Int>()
    dfs(N, 0, 1, 1, nums)

    println(nums.size)
}

fun readInputLine(): String {
    return readLine()!!
}

fun dfs(N: Int, index: Int, cnt: Int, now: Int, nums: MutableList<Int>) {
    if (cnt > 8 || now > N) {
        return
    }
    if (cnt == 8) {
        nums.add(now)
        return
    }
    if (index >= 5) {
        return
    }

    if (index == 0) {
        dfs(N, 1, cnt * 4, now * 27, nums)
    }
    dfs(N, index + 1, cnt * 2, now * primes[index], nums)
    dfs(N, index + 1, cnt, now, nums)
}
