#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>

#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007

using namespace std;

int main(void) {
	int n;
	int count = 0;

	while (cin >> n) {
		count = 0;
		if (n >= 2) {
			count++;
		}
		FOR(i, 3, n) {
			FOR(t, 2, i - 1) {
				if (i%t == 0) {
					break;
				}
				if (t == i - 1) {
					count++;
				}
			}
		}
		cout << count << endl;
		
	}
	
	return 0;
}