import java.util.Scanner;

public class Main{
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);

	  int N = sc.nextInt();


	  int test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


  }
} 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 test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


  }
} Main public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);

	  int N = sc.nextInt();


	  int test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


  } main {
	  Scanner sc = new Scanner(System.in);

	  int N = sc.nextInt();


	  int test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


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

	  int N = sc.nextInt();


	  int test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


  }
} public class Main{
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);

	  int N = sc.nextInt();


	  int test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


  }
} 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 test = 1;
	  int total = 0;
	  while (test <= N) {
		  int count = 0;
		  for (int i = 1; i <= test ; i++) {
			  if(test % i == 0) {
				  count++;
			  }
			  if (count > 8) {
				  break;
			  }
		  }
		  if (count == 8) {
			  total++;
		  }
		  test = test + 2;
	  }
	  System.out.println(total);


  }
}
