import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	}

	static List<Long> divList(long n) {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	}

	static List<Long> divList(long n) {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.close() sc.close sc int ans = 0; ans 0 for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		} int i = 1; int i = 1; i 1 i <= n i n i+=2 i+=2 i 2 {
			if (divList(i).size() == 8) {
				ans++;
			}
		} {
			if (divList(i).size() == 8) {
				ans++;
			}
		} if (divList(i).size() == 8) {
				ans++;
			} divList(i).size() == 8 divList(i).size() divList(i).size divList(i) divList i 8 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args static List<Long> divList(long n) {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	} divList {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	} List<Long> list = new ArrayList<>(); list new ArrayList<>() long end = (long) Math.sqrt(n); end (long) Math.sqrt(n) Math.sqrt Math n for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		} int i = 1; int i = 1; i 1 i <= end i end i++ i++ i {
			if (n % i == 0) {
				list.add((long) i);
			}
		} {
			if (n % i == 0) {
				list.add((long) i);
			}
		} if (n % i == 0) {
				list.add((long) i);
			} n % i == 0 n % i n i 0 {
				list.add((long) i);
			} list.add((long) i) list.add list (long) i int i = end * end == n ? list.size() - 2 : list.size() - 1; i end * end == n ? list.size() - 2 : list.size() - 1 end * end == n end * end end end n list.size() - 2 list.size() list.size list 2 list.size() - 1 list.size() list.size list 1 for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		} ; i >= 0 i 0 i-- i-- i {
			list.add(n / list.get(i));
		} {
			list.add(n / list.get(i));
		} list.add(n / list.get(i)) list.add list n / list.get(i) n list.get(i) list.get list i return list; list long n n public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	}

	static List<Long> divList(long n) {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	}

	static List<Long> divList(long n) {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= n; i+=2) {
			if (divList(i).size() == 8) {
				ans++;
			}
		}
		System.out.println(ans);
	}

	static List<Long> divList(long n) {
		List<Long> list = new ArrayList<>();
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				list.add((long) i);
			}
		}
		int i = end * end == n ? list.size() - 2 : list.size() - 1;
		for ( ; i >= 0; i--) {
			list.add(n / list.get(i));
		}
		return list;
	}
}
