#include <cstdio>
using namespace std;
int main() {
	int n, ans = 0;
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i) {
		if (i % 2 == 1) {
			int cnt = 0;
			for (int j = 1; j <= i; ++j) {
				if (i % j == 0) cnt++;
			}
			if (cnt == 8) ans++;
		}
	}
	printf("%d\n", ans);
	return 0;
}