#include <iostream>
using namespace std;

long mygcd(long a, long b)
{
    if (b == 0) return a;
    if (a < b) return mygcd(b,a);
    return mygcd(a-b,b);
}

int main(void)
{
    long num, length, prime[1000];

    while(cin >> num)
    {
        length = 0;
        int count = 0;
        for (int n = 2; n <= num; n++)
        {
            // judge whether n is prime or not
            bool isPrime = true;
            for(int i=0; i < length-1; i++)
            {
                if (!(n % prime[i]))
                {
                    isPrime = false;
                    break;
                }
            }
            // regist n as prime number
            if (isPrime)
            {
                prime[length] = n;
                length++;
            }
        }
        cout << length << endl;
    }
    return 0;
}