import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int nfound = 0;

    for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    }
    System.out.println(nfound);
  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int nfound = 0;

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

    for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    }
    System.out.println(nfound);
  } main {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int nfound = 0;

    for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    }
    System.out.println(nfound);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int nfound = 0; nfound 0 for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    } {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    } if (i % 2 == 0) {
        continue;
      } i % 2 == 0 i % 2 i 2 0 {
        continue;
      } continue; int n = 0; n 0 for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      } {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      } if (j % 2 == 0) {
          continue;
        } j % 2 == 0 j % 2 j 2 0 {
          continue;
        } continue; if (i % j == 0) {
          n++;
        } i % j == 0 i % j i j 0 {
          n++;
        } n++ n if (n == 8) {
        nfound++;
      } n == 8 n 8 {
        nfound++;
      } nfound++ nfound System.out.println(nfound) System.out.println System.out System System.out nfound String[] args args public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int nfound = 0;

    for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    }
    System.out.println(nfound);
  }
} public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int nfound = 0;

    for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    }
    System.out.println(nfound);
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int nfound = 0;

    for (int i = 1; i <= N; i++) {
      if (i % 2 == 0) {
        continue;
      }
      int n = 0;
      for (int j = 1; j <= i; j++) {
        if (j % 2 == 0) {
          continue;
        }
        if (i % j == 0) {
          n++;
        }
      }
      if (n == 8) {
        nfound++;
      }
    }
    System.out.println(nfound);
  }
}