#include<iostream>
#include<stdio.h>
using namespace std;
 
int main(){
int n;
 
 
while(cin >> n){
int count =0;
for(int i=2;i<=n;i++){
        for(int j=2;j<=i;j++){
                if(i%j==0 && j != i)    break;
                if(j==i)        count++;
                
                }
        }
 
cout << count << endl;  
 }
return 0;
}