import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),s=0,t,i,j;
		sc.close();
		for(i=1;i<=n;i+=2) {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		}
		System.out.print(s);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),s=0,t,i,j;
		sc.close();
		for(i=1;i<=n;i+=2) {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		}
		System.out.print(s);
	}
} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),s=0,t,i,j;
		sc.close();
		for(i=1;i<=n;i+=2) {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		}
		System.out.print(s);
	} main {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),s=0,t,i,j;
		sc.close();
		for(i=1;i<=n;i+=2) {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		}
		System.out.print(s);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc s=0 s 0 t t i i j; j sc.close() sc.close sc for(i=1;i<=n;i+=2) {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		} i=1; i=1 i 1 i<=n i n i+=2 i+=2 i 2 {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		} {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		} t=0 t 0 for(j=1;j<=i;j++) if(i%j==0) t++; j=1; j=1 j 1 j<=i j i j++ j++ j if(i%j==0) t++; if(i%j==0) t++; i%j==0 i%j i j 0 t++ t if(t==8) s++; t==8 t 8 s++ s System.out.print(s) System.out.print System.out System System.out s String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),s=0,t,i,j;
		sc.close();
		for(i=1;i<=n;i+=2) {
			t=0;
			for(j=1;j<=i;j++) if(i%j==0) t++;
			if(t==8) s++;
		}
		System.out.print(s);
	}
}