#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;

bool isPrime(int n)
{
    if(n<=1)
        return false;
    if(n==2)return true;
    if(n%2==0)return false;
    int m=sqrt(n);
    for(int i = 3; i<=m; i+=2)
        if(n%i == 0)
            return false;

    return true;
}

int main()
{
    int num,i,count;

    while(scanf("%d",&num)==1){
        count=0;
       for(i=1;i<=num;i++){

        if(isPrime(i))
            count++;
        }
    printf("%d\n",count);
    }
    return 0;
}