import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(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 if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		} n<105 n 105 {
			System.out.println(0);
			System.exit(0);
		} System.out.println(0) System.out.println System.out System System.out 0 System.exit(0) System.exit System 0 {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		} for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			} int i=105; int i=105; i 105 n+1>i n+1 n 1 i i=i+2 i=i+2 i i+2 i 2 {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			} {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			} int how =0; how 0 for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				} int j=1; int j=1; j 1 i+1>j i+1 i 1 j j++ j++ j {
					if(i%j==0)
						how++;
				} {
					if(i%j==0)
						how++;
				} if(i%j==0)
						how++; i%j==0 i%j i j 0 how++ how if(how==8) {
					count++;
				} how==8 how 8 {
					count++;
				} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Integer[] array = new Integer[m];
		int n = sc.nextInt();
		int count=0;
		if(n<105) {
			System.out.println(0);
			System.exit(0);
		}
		else {
			for(int i=105;n+1>i;i=i+2) {
				int how =0;
				for(int j=1;i+1>j;j++) {
					if(i%j==0)
						how++;
				}
				if(how==8) {
					count++;
				}
				//System.out.println(how);
			}
		}
		System.out.println(count);
	}
}