import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int modSum = 0;
		int answer = 0;

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

		System.out.println(answer);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int modSum = 0;
		int answer = 0;

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

		System.out.println(answer);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int modSum = 0;
		int answer = 0;

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

		System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int modSum = 0;
		int answer = 0;

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

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

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

		System.out.println(answer);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int modSum = 0;
		int answer = 0;

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

		System.out.println(answer);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int modSum = 0;
		int answer = 0;

		for (int i = 1; i <= N; i = i + 2) {
			modSum = 0;
			for (int j = 1; j < i / 2; j = j + 2) {
				if (i % j == 0) modSum++;
			}
			if (modSum + 1 == 8) answer++;
		}

		System.out.println(answer);
	}
}
