import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	}
 
	private static boolean isYakusuEight(int number) {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	}
} import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	}
 
	private static boolean isYakusuEight(int number) {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int answer = 0; answer 0 for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		} int i = 3; int i = 3; i 3 i <=n i n i+=2 i+=2 i 2 {
			if(isYakusuEight(i)) {
				answer++;
			}
		} {
			if(isYakusuEight(i)) {
				answer++;
			}
		} if(isYakusuEight(i)) {
				answer++;
			} isYakusuEight(i) isYakusuEight i {
				answer++;
			} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args private static boolean isYakusuEight(int number) {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	} isYakusuEight {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	} int yakusu = 0; yakusu 0 for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		} int i =1; int i =1; i 1 i <=number i number i++ i++ i {
			if(number % i ==0) {
				yakusu++;
			}
		} {
			if(number % i ==0) {
				yakusu++;
			}
		} if(number % i ==0) {
				yakusu++;
			} number % i ==0 number % i number i 0 {
				yakusu++;
			} yakusu++ yakusu if(yakusu ==8) {
			return true;
		} yakusu ==8 yakusu 8 {
			return true;
		} return true; true return false; false int number number public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	}
 
	private static boolean isYakusuEight(int number) {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	}
} public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	}
 
	private static boolean isYakusuEight(int number) {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	}
} Main
import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for(int i = 3;i <=n;i+=2) {
			if(isYakusuEight(i)) {
				answer++;
			}
		}
		System.out.println(answer);
 
	}
 
	private static boolean isYakusuEight(int number) {
		int yakusu = 0;
		for(int i =1; i <=number;i++) {
			if(number % i ==0) {
				yakusu++;
			}
		}
 
		if(yakusu ==8) {
			return true;
		}
		return false;
	}
}