import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	}
} 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 answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int answer = 0; answer 0 for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		} int i = 1; int i = 1; i 1 i <= n i n i = i + 2 i = i + 2 i i + 2 i 2 {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		} {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		} int count = 0; count 0 for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			} int j = 1; int j = 1; j 1 j <= n / 2 j n / 2 n 2 j = j + 2 j = j + 2 j j + 2 j 2 {
				if (i % j == 0)
					count++;
			} {
				if (i % j == 0)
					count++;
			} if (i % j == 0)
					count++; i % j == 0 i % j i j 0 count++ count if (count + 1 == 8) {
				answer++;
			} count + 1 == 8 count + 1 count 1 8 {
				answer++;
			} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	}
} 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 answer = 0;

		for (int i = 1; i <= n; i = i + 2) {
			int count = 0;
			for (int j = 1; j <= n / 2; j = j + 2) {
				if (i % j == 0)
					count++;
			}
			if (count + 1 == 8) {
				answer++;
			}
		}

		System.out.println(answer);
		sc.close();
	}
}