#include<bits/stdc++.h>
#include<iostream>
#define LIM 999999
using namespace std;
long long int i,j,a,odd;
bool prime[LIM];
long long int arr[999999];
void sieve()
{
    
    arr[a++]=2;
    for(i=3;i<=LIM;i+=2)
    {
        if(!prime[i])
        {
            arr[a++]=i;
            if(i*i<=LIM)
            {
                odd=i;
                
                for(j=i*i;j<=LIM;j=i*odd)
                {
                    prime[j]=true;
                    odd+=2;
                }
            }
        }
        if(a==999999)
            break;
    }
}
int main()
{
    ios_base :: sync_with_stdio(false);
    cin.tie(NULL);
    sieve();
    long long int k, num, count = 0;
    k=0;
    while(scanf("%lld", &num)!=EOF)
    {
        k=0;
        count = 0;

        for(int i=1; i<=num; i++)
        {
            if(i == arr[k])
                {
                    count++;
                    k++;
                }
        }
        printf("%lld\n", count);
    }
    return 0;
}