import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	} main {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=0; b 0 int c=0; c 0 for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		} int i=1; int i=1; i 1 i<=a i a i++ i++ i {
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		} {
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		} if (i%2==0){
				continue;
			} i%2==0 i%2 i 2 0 {
				continue;
			} continue; b=0 b 0 for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			} int j=1; int j=1; j 1 j<=i j i j++ j++ j {
				if(i%j==0){
					b++;
				}
			} {
				if(i%j==0){
					b++;
				}
			} if(i%j==0){
					b++;
				} i%j==0 i%j i j 0 {
					b++;
				} b++ b if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			} b==8 b 8 {
//				System.out.println("iiiii="+i);
				c++;
			} c++ c System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b=0;
		int c=0;
		
		for(int i=1;i<=a;i++){
			if (i%2==0){
				continue;
			}
//			System.out.println("i="+i);
			b=0;
			for(int j=1;j<=i;j++){
				if(i%j==0){
					b++;
				}
			}
//			System.out.println("	b="+b);
			if(b==8){
//				System.out.println("iiiii="+i);
				c++;
			}
		}
		
		
		
		
		
		System.out.println(c);
		
		
		
		
	}

}
