#include <iostream>
using namespace std;
int main(){
    int n,count=0;
    while(cin>>n){
        count=0;
        for(int a=2;a<=n;a++){
            for(int b=2;b<=a;b++){
                if(a==b)count++;
                if(a%b==0)break;
            }
        }
        cout<<count<<endl;
    }
}