import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] a = {105, 135, 165, 189, 195}; a {105, 135, 165, 189, 195} 105 135 165 189 195 for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		} {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		} if (n >= 195) {
				System.out.println(5);
				return;
			} n >= 195 n 195 {
				System.out.println(5);
				return;
			} System.out.println(5) System.out.println System.out System System.out 5 return; if (n < a[i]) {
				System.out.println(i);
				return;
			} n < a[i] n a[i] a i {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i return; String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = {105, 135, 165, 189, 195};
		for (int i = 0; i < a.length; i++) {
			if (n >= 195) {
				System.out.println(5);
				return;
			}
			if (n < a[i]) {
				System.out.println(i);
				return;
			}
		}
	}
}
