import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	}

} 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 l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = 0; l 0 for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		} int i = 1; int i = 1; i 1 i <= n i n i+=2 i+=2 i 2 {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		} {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		} int k = 0; k 0 for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			} int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			} {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			} double x = (double)i / j; x (double)i / j (double)i j if(x - Math.floor(x) == 0)k++; x - Math.floor(x) == 0 x - Math.floor(x) x Math.floor(x) Math.floor Math x 0 k++ k if(k == 8)l++; k == 8 k 8 l++ l System.out.println(l) System.out.println System.out System System.out l String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	}

} 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 l = 0;
		for(int i = 1; i <= n; i+=2) {
			int k = 0;
			for(int j = 1; j <= i; j++) {
				double x = (double)i / j;
				if(x - Math.floor(x) == 0)k++;
			}
			if(k == 8)l++;
		}

		System.out.println(l);
	}

}