import java.util.Scanner;

class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int n2;
		int divisor = 0;
		int div8 = 0;
		
		if (n % 2 == 0) {
			n = n - 1;
		}
		
		do {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} while (n >= 1);
		
	System.out.println(div8);
		
	}

} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int n2;
		int divisor = 0;
		int div8 = 0;
		
		if (n % 2 == 0) {
			n = n - 1;
		}
		
		do {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} while (n >= 1);
		
	System.out.println(div8);
		
	}

} Main public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int n2;
		int divisor = 0;
		int div8 = 0;
		
		if (n % 2 == 0) {
			n = n - 1;
		}
		
		do {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} while (n >= 1);
		
	System.out.println(div8);
		
	} main {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int n2;
		int divisor = 0;
		int div8 = 0;
		
		if (n % 2 == 0) {
			n = n - 1;
		}
		
		do {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} while (n >= 1);
		
	System.out.println(div8);
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int n2; n2 int divisor = 0; divisor 0 int div8 = 0; div8 0 if (n % 2 == 0) {
			n = n - 1;
		} n % 2 == 0 n % 2 n 2 0 {
			n = n - 1;
		} n = n - 1 n n - 1 n 1 do {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} while (n >= 1); n >= 1 n 1 {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} n2 = n n2 n do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1); n2 >= 1 n2 1 {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} if (n % n2 == 0) {
					divisor = divisor + 1;
				} n % n2 == 0 n % n2 n n2 0 {
					divisor = divisor + 1;
				} divisor = divisor + 1 divisor divisor + 1 divisor 1 n2 = n2 - 1 n2 n2 - 1 n2 1 if (divisor == 8) {
					div8 = div8 + 1;
				} divisor == 8 divisor 8 {
					div8 = div8 + 1;
				} div8 = div8 + 1 div8 div8 + 1 div8 1 divisor = 0 divisor 0 n = n - 2 n n - 2 n 2 System.out.println(div8) System.out.println System.out System System.out div8 String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int n2;
		int divisor = 0;
		int div8 = 0;
		
		if (n % 2 == 0) {
			n = n - 1;
		}
		
		do {
		
			n2 = n;
			
			do {
			
				if (n % n2 == 0) {
					divisor = divisor + 1;
				}
				
				n2 = n2 - 1;
						
			} while (n2 >= 1);
				
				if (divisor == 8) {
					div8 = div8 + 1;
				}
		
				divisor = 0;
				n = n - 2;
							
		} while (n >= 1);
		
	System.out.println(div8);
		
	}

}