#include <stdio.h>
#include <iostream>

using namespace std;

int main() {

	int n;
	int i,j;

	while (cin >> n) {
		int counter = 1;

		for (i = 3; i <= n; i = i + 2) {
			int kari = 1;
			for (j = 3; j < i; j=j+2) {
				if ((j % 3 == 0 && j != 3) || (j % 5 == 0 && j != 5) || (j % 7 == 0 && j != 7) || (j % 11 == 0 && j != 11) || (j % 13 == 0 && j != 13) || (j % 17 == 0 && j != 17) ||
					(j % 19 == 0 && j != 19) || (j % 23 == 0 && j != 23)) {
					continue;
				} else if (i % j == 0) {
					kari = 0;
					break;
				}
			}

			if (kari != 0) {
				counter++;
			}
		}

		cout << counter << endl;
	}

	return 0;
}