import java.util.Scanner;

class Main{



	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int N= sc.nextInt();
		int ans = 0;
		for(int i = 1;i <= N;i= i+2){
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		}
			System.out.println(ans);
		
	
	}


}

class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
}
 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();
		int ans = 0;
		for(int i = 1;i <= N;i= i+2){
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		}
			System.out.println(ans);
		
	
	}


} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int N= sc.nextInt();
		int ans = 0;
		for(int i = 1;i <= N;i= i+2){
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		}
			System.out.println(ans);
		
	
	} main {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int N= sc.nextInt();
		int ans = 0;
		for(int i = 1;i <= N;i= i+2){
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		}
			System.out.println(ans);
		
	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N= sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i = 1;i <= N;i= i+2){
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i= i+2 i= i+2 i i+2 i 2 {
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		} {
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		} int count = 0; count 0 for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			} int j = 1; int j = 1; j 1 j <= N j N 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++ count if(count == 8){
				ans++;
			} count == 8 count 8 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
} Pair int from;		//p from int end;		//y end int num; num int bango; bango @Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	} compareTo {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	} Pair otherpair = (Pair)other; otherpair (Pair)other return from - otherpair.from; from - otherpair.from from otherpair.from otherpair otherpair.from Object other other Comparable
import java.util.Scanner;

class Main{



	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int N= sc.nextInt();
		int ans = 0;
		for(int i = 1;i <= N;i= i+2){
			int count = 0;
			for(int j = 1;j <= N;j++){
				if(i%j == 0){
					count++;
				}
			}
			if(count == 8){
				ans++;
			}
		}
			System.out.println(ans);
		
	
	}


}

class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
}

