import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int yakusu = 0; yakusu 0 for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		} int n = 1; int n = 1; n 1 n <= N n N n = n + 2 n = n + 2 n n + 2 n 2 {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		} {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		} int count = 0; count 0 for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			} int m = 1; int m = 1; m 1 m <= n m n m = m + 2 m = m + 2 m m + 2 m 2 {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			} {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			} if (n % m == 0) {
					count++;
				} n % m == 0 n % m n m 0 {
					count++;
				} count++ count if (count == 8) {
					yakusu++;
				} count == 8 count 8 {
					yakusu++;
				} yakusu++ yakusu System.out.println(yakusu) System.out.println System.out System System.out yakusu String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		scanner.close();
		int yakusu = 0;

		for (int n = 1; n <= N; n = n + 2) {
			int count = 0;
			for (int m = 1; m <= n; m = m + 2) {
				if (n % m == 0) {
					count++;
				}

				if (count == 8) {
					yakusu++;
				}
			}
		}
		System.out.println(yakusu);
	}
}