//Prime Number
#include<iostream>
#include<cstdio>

using namespace std;

int main() {
	int n;
	while(cin >> n) {
		int count = 0;
		for(int i = 2; i <= n; i++) {
			bool flag = true;
			for(int j = 2; j <= i/2; j++) {
				if(i % j == 0) {
					flag = false;
					break;
				}
			}
			if(flag == true) {
				count++;
			}
		}
		cout << count << endl;
	}
	return 0;
}