import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int cnt cnt sum = 0 sum 0 t; t for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		} int i = 1; int i = 1; i 1 i <= n i n i = i + 2 i = i + 2 i i + 2 i 2 {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		} {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		} cnt = 0 cnt 0 t = i t i for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			} int j = 1; int j = 1; j 1 j <= i j i j = j + 2 j = j + 2 j j + 2 j 2 {
				if (t % j == 0) {
					cnt++;
				}
			} {
				if (t % j == 0) {
					cnt++;
				}
			} if (t % j == 0) {
					cnt++;
				} t % j == 0 t % j t j 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 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int cnt, sum = 0, t;
		for (int i = 1; i <= n; i = i + 2) {
			cnt = 0;
			t = i;
			for (int j = 1; j <= i; j = j + 2) {
				if (t % j == 0) {
					cnt++;
				}
			}
			if (cnt == 8) {
				sum++;
			}
		}
		System.out.println(sum);
	}
}
