#include <iostream>

using namespace std;

typedef long long ll;

int main()
{
    int n;
    while(cin >> n) {
        int ans = 1;
        
        for(int i = 3; i <= n; i+=2) {
            bool isPrime = true;
            for(int j = 3; (j * j) <= i; j+=2) {
                if(i % j == 0) {
                    isPrime = false;
                    break;
                }
            }
            if(isPrime) ans++;
        }
        cout << ans << endl;
    }
    return 0;
}