import java.util.Scanner;

class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		byte divisor;
		byte div8 = 0;
		
		if (n % 2 == 0) {
			n--;
		}
		
		for (; n > 0; n -=2) {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		}
		
		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();
		byte divisor;
		byte div8 = 0;
		
		if (n % 2 == 0) {
			n--;
		}
		
		for (; n > 0; n -=2) {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		}
		
		System.out.println(div8);
	
	}

} Main public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		byte divisor;
		byte div8 = 0;
		
		if (n % 2 == 0) {
			n--;
		}
		
		for (; n > 0; n -=2) {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		}
		
		System.out.println(div8);
	
	} main {
	
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		byte divisor;
		byte div8 = 0;
		
		if (n % 2 == 0) {
			n--;
		}
		
		for (; n > 0; n -=2) {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		}
		
		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 byte divisor; divisor byte div8 = 0; div8 0 if (n % 2 == 0) {
			n--;
		} n % 2 == 0 n % 2 n 2 0 {
			n--;
		} n-- n for (; n > 0; n -=2) {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		} ; n > 0 n 0 n -=2 n -=2 n 2 {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		} {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		} divisor = 0 divisor 0 for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
				if (n % i == 0) {
					divisor++;
				}
			} {
				if (n % i == 0) {
					divisor++;
				}
			} if (n % i == 0) {
					divisor++;
				} n % i == 0 n % i n i 0 {
					divisor++;
				} divisor++ divisor if (divisor == 8) {
				div8++;
			} divisor == 8 divisor 8 {
				div8++;
			} div8++ div8 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();
		byte divisor;
		byte div8 = 0;
		
		if (n % 2 == 0) {
			n--;
		}
		
		for (; n > 0; n -=2) {
			
			divisor = 0;
		
		
			for (int i = 1; i <= n; i++ ) {
				if (n % i == 0) {
					divisor++;
				}
			}
			
			if (divisor == 8) {
				div8++;
			}
			
		}
		
		System.out.println(div8);
	
	}

}