
import java.util.Scanner;

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

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	} main {
		Scanner scan = new Scanner(System.in);

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int count = 0; count 0 int count8 = 0; count8 0 int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int i = 1; i 1 int j = 1; j 1 while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		} i <= n i n {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		} while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			} j <= i j i {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			} if (i % j == 0) {
					count++;
				} i % j == 0 i % j i j 0 {
					count++;
				} count++ count j = j + 1 j j + 1 j 1 if (count == 8) {
				count8 = count8 + 1;
			} count == 8 count 8 {
				count8 = count8 + 1;
			} count8 = count8 + 1 count8 count8 + 1 count8 1 count = 0 count 0 i = i + 2 i i + 2 i 2 j = 1 j 1 System.out.println(count8) System.out.println System.out System System.out count8 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	}

} Main

import java.util.Scanner;

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

		int count = 0;
		int count8 = 0;
		int n = scan.nextInt();

		int i = 1;
		int j = 1;
		while (i <= n) {
			while (j <= i) {
				if (i % j == 0) {
					count++;
				}

				j = j + 1;
			}
			if (count == 8) {
				count8 = count8 + 1;
			}
			count = 0;
			i = i + 2;
			j = 1;

		}
		System.out.println(count8);
	}

}
