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

class SOSU{
   public:
      int sosu(int);
};
int SOSU::sosu(int n){
   if(n==2)
      return 1;
   
   int i,j,z=1,flag;
   int ans = 1;
   int s[9999];
   s[0]=2;
   for(i=3;i<=n;i++){
      flag = 0;
      for(j=0;j<z;j++){
         if(i%s[j]==0){
            flag++;
            break;
         }
      }
      if(flag == 0){
         s[z] = i;
         z++;
         ans++;
      }
   }
   return ans;
}
int main(){
   SOSU Sosu;
   int n,ans;
   while(cin>>n){
      ans = Sosu.sosu(n);
      printf("%d\n",ans);
   }
   return 0;
}