#include<iostream>
#include<vector>

#define LIM 1000000
using namespace std;

void prime();

vector<int> prime_map;

int main(){
  int num, i=0,j=0;
  vector<int> count;
  prime();
  cout<<"plese"<<endl;
  while(cin){
    cin>>num;
    i=0;
    while(prime_map[i]<=num){
      i=i+1;
    }
    count.push_back(i);
    j++;
  }

  i=0;
  while(i<j){
    cout<< count[i]<<endl;
    i++;
  }
}

void prime(){
  bool judge;
  for(int i = 2; i <= LIM;i++){
    judge=1;
    for(int j= 2; j < i/2; j++){
      if(i%j == 0)judge = 0 break;
    }
    if(judge == 1)prime_map.push_back(i);
  }
}