#include<iostream>
#include<stack>
using namespace std;
int main() {
	int n, ans = 0, i, count = 0,count2=0;
	while (cin >> n) {
		for (i = 2; i <= n; i++) {
			for (int j = 2; j <= i; j++) {
				if (i % 2 != 0 && i % 3 != 0 && i % 5 !=0 && i%7 != 0) {
					count = 1;
					break;
				}
				if (i > 11) {
					if (i % 2 == 0 || i % 3 == 0 || i % 5 == 0 || i % 7 == 0) {
						count = 0;
						break;
					}
				}
				if (i%j == 0) {
					count++;
				}
				if (i%j != 0) {
					count2++;
				}
				if (count >= 2 ) {
					break;
				}
			}
			if (count == 1) {
				ans++;
			}
			count = 0;
		}
		cout << ans << endl;
		ans = 0;
	}
	return 0;
}