#include<iostream>
using namespace std;
int main(){
  int n,count,sc;
  while(cin>>n){
    count = 0;
    for(int i=2;i<=n;i++){
      sc = 0;
      for(int j=2;j<=i;j++) if(i%j==0) sc++;
      if(sc==1) count++;
    }
    cout << count << endl;
  }
  return 0;
}