def isprime(n)
    if n < 2
        return false
    end

    if n == 2
        return true
    end

    i = 2 

    while i * i <= n do
        if n % i == 0
            return false
        end
        i += 1
    end
    return true
end

loop do
    n = gets.to_i
    c = 0
    for i in 1..n
        if isprime(i)
            c += 1
        end
    end
    puts c
end