import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	}
} 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 answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int answer = 0; answer 0 for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		} int targetNum = 1; int targetNum = 1; targetNum 1 targetNum <= n targetNum n targetNum++ targetNum++ targetNum {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		} {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		} int divisorCount = 0; divisorCount 0 if (targetNum % 2 == 0) {
				continue;
			} targetNum % 2 == 0 targetNum % 2 targetNum 2 0 {
				continue;
			} continue; for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			} int i = 1; int i = 1; i 1 i <= targetNum i targetNum i++ i++ i {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			} {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			} if (targetNum % i == 0) {
					divisorCount++;
				} targetNum % i == 0 targetNum % i targetNum i 0 {
					divisorCount++;
				} divisorCount++ divisorCount if (divisorCount == 8) {
				answer++;
			} divisorCount == 8 divisorCount 8 {
				answer++;
			} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	}
} 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 answer = 0;
		for (int targetNum = 1; targetNum <= n; targetNum++) {
			int divisorCount = 0;
			if (targetNum % 2 == 0) {
				continue;
			}
			for (int i = 1; i <= targetNum; i++) {
				if (targetNum % i == 0) {
					divisorCount++;
				}
			}
			if (divisorCount == 8) {
				answer++;
			}
		}

		System.out.println(answer);

		sc.close();
	}
}