import java.util.Scanner;

public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	}

	public static  int yaku(int N){
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	}

	public static  int yaku(int N){
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	}
} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	} main {
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	} int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		} int i = 8 ; int i = 8 ; i 8 i <= N i N i++ i++ i {
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		} {
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		} if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			} i % 2 == 1 && yaku(i) == 8 i % 2 == 1 i % 2 i 2 1 yaku(i) == 8 yaku(i) yaku i 8 {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static  int yaku(int N){
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	} yaku {
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	} int yaku = 0; yaku 0 for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		} int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
			if(N % i == 0){
				yaku++;
			}
		} {
			if(N % i == 0){
				yaku++;
			}
		} if(N % i == 0){
				yaku++;
			} N % i == 0 N % i N i 0 {
				yaku++;
			} yaku++ yaku return yaku; yaku int N N public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	}

	public static  int yaku(int N){
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	}
} public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	}

	public static  int yaku(int N){
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	}
} Main
import java.util.Scanner;

public class Main {
	public static Scanner sc = new Scanner(System.in);
	public static void main(String[] args){
		//B
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 8 ; i <= N ; i++){
			if(i % 2 == 1 && yaku(i) == 8){
				ans++;
			}
		}
		System.out.println(ans);
	}

	public static  int yaku(int N){
		int yaku = 0;
		for(int i = 1 ; i <= N; i++){
			if(N % i == 0){
				yaku++;
			}
		}
		return yaku;
	}
}
