#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 999999

using namespace std;

typedef long long ll;

int main()
{
	int n;
	
	while (cin >> n) {
		int count = 0;
		for (int i = 2; i <= n; i++) {
			int ope = 1;
			for (int j = 2; j*j <= i; j++) {
				if (i%j == 0) {
					ope = 0;
					break;
				}
			}
			count += ope;
		}
		cout << count << endl;
	}

	return 0;
}