import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int q = 0; q 0 for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		} int k = 1; int k = 1; k 1 k <= n k n k+=2 k+=2 k 2 {
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		} {
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		} int cnt = 0; cnt 0 for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			} int h = 1; int h = 1; h 1 h <= k h k h++ h++ h {
				if (k % h == 0) { cnt++;}
			} {
				if (k % h == 0) { cnt++;}
			} if (k % h == 0) { cnt++;} k % h == 0 k % h k h 0 { cnt++;} cnt++ cnt if (cnt == 8) {q++;} cnt == 8 cnt 8 {q++;} q++ q System.out.println(q) System.out.println System.out System System.out q String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int q = 0;
		for (int k = 1; k <= n; k+=2){
			int cnt = 0;
			for (int h = 1; h <= k; h++) {
				if (k % h == 0) { cnt++;}
			}
			if (cnt == 8) {q++;}
		}
		System.out.println(q);
	}
}