/*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0009&lang=jp*/

#include <iostream>

using namespace std;

int main()
{
    int n;
    while (cin>>n){
        int count=0;
        for (int i = n; 1 < i ; i--) {
            int prime_flag= 1;
            for (int j = i - 1 ; 1 < j ; j--) {
                if(i%j==0){
                    prime_flag= 0;
                }
            }
            count+=prime_flag;
        }
        cout<<count<<endl;
    }
    return 0;
}