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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	}

	//約数列挙
	//約数列挙の処理は、計算量O(√N)
	static List<Long> enumDivisors(long n) {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections 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) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	}

	//約数列挙
	//約数列挙の処理は、計算量O(√N)
	static List<Long> enumDivisors(long n) {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int sum = 0; sum 0 for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		} int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		} {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		} if (enumDivisors(i).size() == 8) {
				sum++;
			} enumDivisors(i).size() == 8 enumDivisors(i).size() enumDivisors(i).size enumDivisors(i) enumDivisors i 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 //約数列挙
	//約数列挙の処理は、計算量O(√N)
	static List<Long> enumDivisors(long n) {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	} enumDivisors {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	} List<Long> list = new ArrayList<>(); list new ArrayList<>() for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		} long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		} {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		} if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			} n % i == 0 n % i n i 0 {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			} list.add(i) list.add list i if (n / i != i) {
					list.add(n / i);
				} n / i != i n / i n i i {
					list.add(n / i);
				} list.add(n / i) list.add list n / i n i Collections.sort(list) Collections.sort Collections list return list; list long n n public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	}

	//約数列挙
	//約数列挙の処理は、計算量O(√N)
	static List<Long> enumDivisors(long n) {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	}

	//約数列挙
	//約数列挙の処理は、計算量O(√N)
	static List<Long> enumDivisors(long n) {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int sum = 0;
		for (int i = 1; i <= n; i += 2) {
			if (enumDivisors(i).size() == 8) {
				sum++;
			}
		}
		System.out.println(sum);
		sc.close();
	}

	//約数列挙
	//約数列挙の処理は、計算量O(√N)
	static List<Long> enumDivisors(long n) {
		List<Long> list = new ArrayList<>();
		for (long i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				list.add(i);
				if (n / i != i) {
					list.add(n / i);
				}
			}
		}
		Collections.sort(list);
		return list;
	}
}