import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		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);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String buff= ""; buff "" int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int count=0 count 0 flag=0; flag 0 double count1=0 count1 0 count2=0; count2 0 int count3=0; count3 0 for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		} int j=105; int j=105; j 105 j<=m j m j++ j++ j {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		} {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		} for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			} int i=1; int i=1; i 1 i<=j i j i+=2 i+=2 i 2 {
				if(j%i==0) {
					count3++;
				}
			} {
				if(j%i==0) {
					count3++;
				}
			} if(j%i==0) {
					count3++;
				} j%i==0 j%i j i 0 {
					count3++;
				} count3++ count3 if(j%2!=0 && count3==8) {
				count++;
			} j%2!=0 && count3==8 j%2!=0 j%2 j 2 0 count3==8 count3 8 {
				count++;
			} count++ count count3=0 count3 0 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);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String s= sc.next();
		String buff= "";
		//double n = sc.nextInt()/1000.0;
		int m = sc.nextInt();
		//int k = sc.nextInt();
		//String s=sc.next();
		int count=0,flag=0;
		double count1=0,count2=0;
		int count3=0;
		//int[][] array1 = new int[m][k];
		/*array[0]=n-m;
		array[1]=n*m;
		array[2]=n+m;*/
		//Arrays.sort(array);

		for(int j=105;j<=m;j++) {
			for(int i=1;i<=j;i+=2) {
				if(j%i==0) {
					count3++;
				}
			}
			//System.out.println(count3);
			if(j%2!=0 && count3==8) {
				count++;
			}
			count3=0;
		}

		/*if(count==0) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}*/

		System.out.println(count);
	}
}


