

import java.util.*;

public class Main {
	
	public static int eightdivisors(int n) {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	}

	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	}

} import java.util.*; util.* java public class Main {
	
	public static int eightdivisors(int n) {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	}

	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	}

} Main public static int eightdivisors(int n) {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	} eightdivisors {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	} int divisors = 0; divisors 0 int output; output for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if(n%i == 0) {
				divisors++;
			}
		} {
			if(n%i == 0) {
				divisors++;
			}
		} if(n%i == 0) {
				divisors++;
			} n%i == 0 n%i n i 0 {
				divisors++;
			} divisors++ divisors if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		} divisors != 8 divisors 8 {
			output = 0;
		} output = 0 output 0 {
			output = 1;
		} output = 1 output 1 return output; output int n n public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int amount = 0; amount 0 int i = 1; i 1 while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		} i <= N i N {
			amount += eightdivisors(i);
			i += 2;
		} amount += eightdivisors(i) amount eightdivisors(i) eightdivisors i i += 2 i 2 System.out.println(amount) System.out.println System.out System System.out amount String[] args args public class Main {
	
	public static int eightdivisors(int n) {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	}

	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	}

} public class Main {
	
	public static int eightdivisors(int n) {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	}

	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	}

} Main


import java.util.*;

public class Main {
	
	public static int eightdivisors(int n) {
		int divisors = 0;
		int output;
		
		for(int i=1; i<=n; i++) {
			if(n%i == 0) {
				divisors++;
			}
		}
		
		if(divisors != 8) {
			output = 0;
		} else {
			output = 1;
		}
		
		return output;
	}

	
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int amount = 0;
		
		int i = 1;		
		while(i <= N) {
			amount += eightdivisors(i);
			i += 2;
		}
		
		System.out.println(amount);
	}

}
