#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>

using namespace std;

int main(){
	
	int i,N,count= 0;
	bool flag;

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

	return 0;
}