import java.util.*;
 
class Main {
	public static void main (String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int count = 0;
		
		//Nまでの奇数をとる
		for (int i = 1; i <= N; i+=2) {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		}
		System.out.println(count);
	}
} import java.util.*; util.* java class Main {
	public static void main (String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int count = 0;
		
		//Nまでの奇数をとる
		for (int i = 1; i <= N; i+=2) {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		}
		System.out.println(count);
	}
} Main public static void main (String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int count = 0;
		
		//Nまでの奇数をとる
		for (int i = 1; i <= N; i+=2) {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int count = 0;
		
		//Nまでの奇数をとる
		for (int i = 1; i <= N; i+=2) {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		}
		System.out.println(count);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for (int i = 1; i <= N; i+=2) {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i+=2 i+=2 i 2 {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		} {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		} int div = 0; div 0 for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			} int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
				if(i%j == 0) {
					div++;
				}
			} {
				if(i%j == 0) {
					div++;
				}
			} if(i%j == 0) {
					div++;
				} i%j == 0 i%j i j 0 {
					div++;
				} div++ div if (div == 8) {
				count++;
			} div == 8 div 8 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;
 
class Main {
	public static void main (String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int count = 0;
		
		//Nまでの奇数をとる
		for (int i = 1; i <= N; i+=2) {
			//divを初期化
			int div = 0;
			//約数の計算
			for (int j = 1; j <= i; j++) {
				if(i%j == 0) {
					div++;
				}
			}
			//System.out.println(i + "の約数 : " + div + "個");
			
			//div==8のときのみ、countに追加
			if (div == 8) {
				count++;
			}
		}
		System.out.println(count);
	}
}