import java.util.Scanner;

public class Main{
  public static void main(String[] args){
  Scanner scanner=new Scanner(System.in);
  int n =scanner.nextInt();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

  System.out.println(n);
  }
} 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();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

  System.out.println(n);
  }
} Main public static void main(String[] args){
  Scanner scanner=new Scanner(System.in);
  int n =scanner.nextInt();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

  System.out.println(n);
  } main {
  Scanner scanner=new Scanner(System.in);
  int n =scanner.nextInt();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

  System.out.println(n);
  } Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int n =scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  } n<105 n 105 {
  n=0;
  } n=0 n 0 if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  } n<135 n 135 {
  n=1;
  } n=1 n 1 if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  } n<165 n 165 {
  n=2;
  } n=2 n 2 if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  } n<189 n 189 {
  n=3;
  } n=3 n 3 if (n<195){
  n=4;
  }else{
  n=5;
  } n<195 n 195 {
  n=4;
  } n=4 n 4 {
  n=5;
  } n=5 n 5 System.out.println(n) System.out.println System.out System System.out n String[] args args public class Main{
  public static void main(String[] args){
  Scanner scanner=new Scanner(System.in);
  int n =scanner.nextInt();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

  System.out.println(n);
  }
} public class Main{
  public static void main(String[] args){
  Scanner scanner=new Scanner(System.in);
  int n =scanner.nextInt();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

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

public class Main{
  public static void main(String[] args){
  Scanner scanner=new Scanner(System.in);
  int n =scanner.nextInt();
  
  if(n<105){
  n=0;
  }else if (n<135){
  n=1;
  }else if (n<165){
  n=2;
  }else if (n<189){
  n=3;
  }else if (n<195){
  n=4;
  }else{
  n=5;
  }

  System.out.println(n);
  }
}