#include <vector>
#include <iostream>

using namespace std;
int main(){
  
 int input;
 while(cin >> input){
 int res = 0;
 int   flag = 0;
 for (int i = 2; i <= input; ++i){
     for (int j = 2; j < i; ++j){
         if (i % j == 0){
             flag = 1;
         }
     }
         if (flag == 0){
             res++;
         }else{
             flag = 0;
         }
     
 }
 cout << res << endl;
}
}