import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		int count = 0;
		for(int i=1; i<=N; i++) {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		int count = 0;
		for(int i=1; i<=N; i++) {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		int count = 0;
		for(int i=1; i<=N; i++) {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		}
		System.out.println(count);
	} main {

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		int count = 0;
		for(int i=1; i<=N; i++) {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int count = 0; count 0 for(int i=1; i<=N; i++) {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		} {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		} if(i % 2 == 0)continue; i % 2 == 0 i % 2 i 2 0 continue; int a=0; a 0 for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			} int j=1; int j=1; j 1 j<=i j i j++ j++ j {
				if(i%j == 0) a++;
			} {
				if(i%j == 0) a++;
			} if(i%j == 0) a++; i%j == 0 i%j i j 0 a++ a if(a==8)count++; a==8 a 8 count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		int count = 0;
		for(int i=1; i<=N; i++) {
			if(i % 2 == 0)continue;
			int a=0;
			for(int j=1;j<=i; j++) {
				if(i%j == 0) a++;
			}
			if(a==8)count++;
		}
		System.out.println(count);
	}
}
