import java.util.Scanner;

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

	private static int getDivisor(int i) {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	}
} 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 count = 0;
		for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		}
		System.out.println(count);
	}

	private static int getDivisor(int i) {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		} int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
			if (getDivisor(i) == 8) {
				count++;
			}
		} {
			if (getDivisor(i) == 8) {
				count++;
			}
		} if (getDivisor(i) == 8) {
				count++;
			} getDivisor(i) == 8 getDivisor(i) getDivisor i 8 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static int getDivisor(int i) {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	} getDivisor {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	} int divisor = 0; divisor 0 int sqrt = (int) Math.sqrt(i); sqrt (int) Math.sqrt(i) Math.sqrt Math i for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		} int j = 1; int j = 1; j 1 j <= sqrt j sqrt j++ j++ j {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		} {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		} if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			} i % j == 0 i % j i j 0 {
				divisor += (j * j == i) ? 1 : 2;
			} divisor += (j * j == i) ? 1 : 2 divisor (j * j == i) ? 1 : 2 (j * j == i) j * j j j i 1 2 return divisor; divisor int i i public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		}
		System.out.println(count);
	}

	private static int getDivisor(int i) {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		}
		System.out.println(count);
	}

	private static int getDivisor(int i) {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	}
} 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 count = 0;
		for (int i = 1; i <= n; i += 2) {
			if (getDivisor(i) == 8) {
				count++;
			}
		}
		System.out.println(count);
	}

	private static int getDivisor(int i) {
		int divisor = 0;
		int sqrt = (int) Math.sqrt(i);
		for (int j = 1; j <= sqrt; j++) {
			if (i % j == 0) {
				divisor += (j * j == i) ? 1 : 2;
			}
		}
		return divisor;
	}
}