import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		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, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N cnt = 0 cnt 0 sum = 0; sum 0 N = sc.nextInt() N sc.nextInt() sc.nextInt sc for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		} {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		} if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			} i % 2 != 0 i % 2 i 2 0 {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			} cnt = 0 cnt 0 for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				} int k = 1; int k = 1; k 1 k <= N k N k++ k++ k {
					if (i % k == 0) {
						cnt++;
					}

				} {
					if (i % k == 0) {
						cnt++;
					}

				} if (i % k == 0) {
						cnt++;
					} i % k == 0 i % k i k 0 {
						cnt++;
					} cnt++ cnt if (cnt == 8) {
					sum++;
				} cnt == 8 cnt 8 {
					sum++;
				} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum 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, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N, cnt = 0, sum = 0;
		N = sc.nextInt();
		for (int i = 1; i <= N; i++) {
			if (i % 2 != 0) {
				cnt = 0;
				for (int k = 1; k <= N; k++) {
					if (i % k == 0) {
						cnt++;
					}

				}
				if (cnt == 8) {
					sum++;
				}
			}
		}
		System.out.println(sum);
		sc.close();
	}

}
