#include <iostream>
using namespace std;

int n, c, s;

int main(){
	cin >> n;
	s = 0;
	for (int i = 1; i <= n; i+=2){
		c = 0;
		for (int j = 1; j <= i; ++j){
			c += (i % j == 0);
		}
		s += (c == 8);
	}
	cout << s;
}