import java.util.*;
public class Main{
	static int EightDivsJudge(int k){
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	}
} import java.util.*; util.* java public class Main{
	static int EightDivsJudge(int k){
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	}
} Main static int EightDivsJudge(int k){
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	} EightDivsJudge {
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	} int num = 0; num 0 for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		} int i=1; int i=1; i 1 i<=((k+1)/2)*2 - 1 i ((k+1)/2)*2 - 1 ((k+1)/2)*2 ((k+1)/2) (k+1) k 1 2 2 1 i+=2 i+=2 i 2 {
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		} {
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		} int count = 0; count 0 for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			} int j=1; int j=1; j 1 j<=i j i j++ j++ j {
				if(i%j==0)count++;
			} {
				if(i%j==0)count++;
			} if(i%j==0)count++; i%j==0 i%j i j 0 count++ count if(count==8)num++; count==8 count 8 num++ num return num; num int k k public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc System.out.println(EightDivsJudge(n)) System.out.println System.out System System.out EightDivsJudge(n) EightDivsJudge n String[] args args public class Main{
	static int EightDivsJudge(int k){
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	}
} public class Main{
	static int EightDivsJudge(int k){
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	}
} Main
import java.util.*;
public class Main{
	static int EightDivsJudge(int k){
		int num = 0;
		for(int i=1; i<=((k+1)/2)*2 - 1; i+=2){
			int count = 0;
			for(int j=1; j<=i; j++){
				if(i%j==0)count++;
			}
			if(count==8)num++;
		}
		return num;
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(EightDivsJudge(n));
	}
}