import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	int f(int x) {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	int f(int x) {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out int f(int x) {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	} f {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	} int result = 0; result 0 for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		} int i = 1; int i = 1; i 1 i <= x i x i++ i++ i {
			if (x % i == 0) {
				result++;
			}
		} {
			if (x % i == 0) {
				result++;
			}
		} if (x % i == 0) {
				result++;
			} x % i == 0 x % i x i 0 {
				result++;
			} result++ result return result; result int x x public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	} _main {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	} Scanner sc = new Scanner(in); sc new Scanner(in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i += 2 i += 2 i 2 {
			if (f(i) == 8) {
				ans++;
			}
		} {
			if (f(i) == 8) {
				ans++;
			}
		} if (f(i) == 8) {
				ans++;
			} f(i) == 8 f(i) f i 8 {
				ans++;
			} ans++ ans out.println(ans) out.println out ans sc.close() sc.close sc String[] args args public static void main(String[] args) {
		new Main()._main(args);
	} main {
		new Main()._main(args);
	} new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	int f(int x) {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	int f(int x) {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	int f(int x) {
		int result = 0;
		for (int i = 1; i <= x; i++) {
			if (x % i == 0) {
				result++;
			}
		}
		return result;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int N = sc.nextInt();

		int ans = 0;
		for (int i = 1; i <= N; i += 2) {
			if (f(i) == 8) {
				ans++;
			}
		}
		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

}
