import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  }
} 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 count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  } main {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 if (N >= 105) count++; N >= 105 N 105 count++ count if (N >= 135) count++; N >= 135 N 135 count++ count if (N >= 165) count++; N >= 165 N 165 count++ count if (N >= 189) count++; N >= 189 N 189 count++ count if (N >= 195) count++; N >= 195 N 195 count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  }
} 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 count = 0;
    if (N >= 105) count++;
    if (N >= 135) count++;
    if (N >= 165) count++;
    if (N >= 189) count++;
    if (N >= 195) count++;
    System.out.println(count);
  }
}
