#include <iostream>
using namespace std;
 
bool IsPrime(int n){
    for(int i=2;i*i<=n;i++){
        if(n%i == 0){return false;}
    }
    return true;
}
 
int main(void) {
	int n;
 while(cin >> n){	
    int count = 1;
    
    for(int i=3;i<=n;i=i+2){
        if(IsPrime(i)) count++;
    }
    cout << count << endl;
    count = 0;
}

    return 0;
}
