
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int ans = 0; ans 0 for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i = i + 2 i = i + 2 i i + 2 i 2 {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		} {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		} int divisor = 0; divisor 0 for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			} int j = 1; int j = 1; j 1 j <= Math.sqrt(i) j Math.sqrt(i) Math.sqrt Math i j++ j++ j {

				if (i % j == 0) {
					divisor++;
				}

			} {

				if (i % j == 0) {
					divisor++;
				}

			} if (i % j == 0) {
					divisor++;
				} i % j == 0 i % j i j 0 {
					divisor++;
				} divisor++ divisor if (divisor*2 == 8) {
				ans++;
			} divisor*2 == 8 divisor*2 divisor 2 8 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int ans = 0;

		for (int i = 1; i <= N; i = i + 2) {
			int divisor = 0;

			for (int j = 1; j <= Math.sqrt(i); j++) {

				if (i % j == 0) {
					divisor++;
				}

			}

			if (divisor*2 == 8) {
				ans++;
			}
		}
		System.out.println(ans);
		scan.close();
	}
}
