import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	}
}
 import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int count = 0; count 0 int num = 0; num 0 int numplus = 0; numplus 0 int divisor_count = 0; divisor_count 0 int Ncount = 0; Ncount 0 for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		} Ncount = 1; Ncount = 1 Ncount 1 Ncount <= N Ncount N Ncount = Ncount + 2 Ncount = Ncount + 2 Ncount Ncount + 2 Ncount 2 {
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		} {
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		} num = Ncount num Ncount for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			} numplus = 1; numplus = 1 numplus 1 num >= numplus num numplus numplus++ numplus++ numplus {
				if (num % numplus == 0){
					count++;
				}
				
			} {
				if (num % numplus == 0){
					count++;
				}
				
			} if (num % numplus == 0){
					count++;
				} num % numplus == 0 num % numplus num numplus 0 {
					count++;
				} count++ count numplus = 0 numplus 0 if (count == 8){
				divisor_count++;
			} count == 8 count 8 {
				divisor_count++;
			} divisor_count++ divisor_count count = 0 count 0 System.out.println(divisor_count) System.out.println System.out System System.out divisor_count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		
		
		int count = 0;
		int num = 0;
		int numplus = 0;
		int divisor_count = 0;
		int Ncount = 0;
		
		
		
		for (Ncount = 1; Ncount <= N; Ncount = Ncount + 2){
			num = Ncount;
			for (numplus = 1; num >= numplus; numplus++){
				if (num % numplus == 0){
					count++;
				}
				
			}
			numplus = 0;
			
			if (count == 8){
				divisor_count++;
			}
			count = 0;
		}
		
		
		System.out.println(divisor_count);
		
	}
}

