import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	}

	private static boolean numYaku8(int n)
	{
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	}
} 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 ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	}

	private static boolean numYaku8(int n)
	{
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	}
} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans = 0; ans 0 sc.close() sc.close sc for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		} int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
			if (numYaku8(i)) ans+=1;
		} {
			if (numYaku8(i)) ans+=1;
		} if (numYaku8(i)) ans+=1; numYaku8(i) numYaku8 i ans+=1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static boolean numYaku8(int n)
	{
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	} numYaku8 {
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	} int yaku=0; yaku 0 for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if (n % i == 0) yaku+=1;
		} {
			if (n % i == 0) yaku+=1;
		} if (n % i == 0) yaku+=1; n % i == 0 n % i n i 0 yaku+=1 yaku 1 if (yaku == 8) return true; yaku == 8 yaku 8 return true; true return false; false int n n public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	}

	private static boolean numYaku8(int n)
	{
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	}

	private static boolean numYaku8(int n)
	{
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	}
} 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 ans = 0;
		sc.close();
		for (int i=1; i<=n; i+=2) {
			if (numYaku8(i)) ans+=1;
		}
		System.out.println(ans);
	}

	private static boolean numYaku8(int n)
	{
		int yaku=0;
		for (int i=1; i<=n; i++) {
			if (n % i == 0) yaku+=1;
		}
		if (yaku == 8) return true;
		return false;
	}
}
