#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int n;

    while (cin >> n) {
        if (n == 2) {
            cout << 1 << endl;
            continue;
        }

        int ans = 1;
        for (int i = 3; i <= n; i += 2) {
            bool flag = true;
            
            if (!(i % 2))
                continue;
            for (int j = 3; j * j <= i; j += 2) {
                if (!(i % j)) {
                    flag = false;
                    break;
                }
            }
            if (flag)
                ans++;
        }
        cout << ans << endl;
    }
    
    return 0;
}