import java.util.Scanner;

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

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

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

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    }
  } main {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    }
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    } in.hasNext() in.hasNext in {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    } int N = in.nextInt(); N in.nextInt() in.nextInt in int countEightDivisor = 0; countEightDivisor 0 for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      } int i = 1; int i = 1; i 1 i <= N i N i += 2 i += 2 i 2 {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      } {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      } int divisorCount = 0; divisorCount 0 for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        } int d = 1; int d = 1; d 1 d <= i d i ++d ++d d {
          if (i % d == 0) {
            ++divisorCount;
          }
        } {
          if (i % d == 0) {
            ++divisorCount;
          }
        } if (i % d == 0) {
            ++divisorCount;
          } i % d == 0 i % d i d 0 {
            ++divisorCount;
          } ++divisorCount divisorCount if (divisorCount == 8) {
          ++countEightDivisor;
        } divisorCount == 8 divisorCount 8 {
          ++countEightDivisor;
        } ++countEightDivisor countEightDivisor System.out.println(countEightDivisor) System.out.println System.out System System.out countEightDivisor String[] args args public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

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

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    }
  }
} Main
import java.util.Scanner;

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

    while (in.hasNext()) {
      int N = in.nextInt();
      int countEightDivisor = 0;

      for (int i = 1; i <= N; i += 2) {
        int divisorCount = 0;

        for (int d = 1; d <= i; ++d) {
          if (i % d == 0) {
            ++divisorCount;
          }
        }

        if (divisorCount == 8) {
          ++countEightDivisor;
        }
      }

      System.out.println(countEightDivisor);
    }
  }
}