#include <iostream>
using namespace std;

int setPrimeNumberCount(int n) {
    int count = 0;
    bool primeFlag = true;
    
    if(n >= 2) {
        count++;
    }
    
    for(int i = 3; i <= n; i+=2) {
        for(int j = 3; j < i; j+=2) {
            if(i % j == 0) {
                primeFlag = false;
            }
        }
        if(primeFlag) {
            count++;
        }
        primeFlag = true;
    }
    
    
    return count;
}

int main(void) {
    int n;
    int count = 0;
    
    while(cin >> n) {
        count = setPrimeNumberCount(n);
        cout << count << endl;
        count = 0;
    }
    return 0;
}