#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;

int main(){
  int n;

  while(cin >> n){
    int cnt = 0;
    for(int i = 1; i <= n; i++){

      if(i % 2 == 0|| i % 3 == 0 || i % 5 == 0) continue;

      int yakusuu = 0;

      for(int j = 1; i <= i; j++){
        if(i % j == 0) yakusuu++;
      }

      if(yakusuu==2) cnt++;

    }
    cout << cnt + 3 - 1 << endl;
  }
  return 0;
}