import java.awt.Point;
import java.util.ArrayDeque;
import java.util.Scanner;
import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Collection;


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


                
        }
        
        
        

		
	
} import java.awt.Point; Point java.awt import java.util.ArrayDeque; ArrayDeque java.util import java.util.Scanner; Scanner java.util import java.util.*; util.* java import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util import java.util.Set; Set java.util import java.util.HashSet; HashSet java.util import java.util.Collection; Collection java.util public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        
        
        
        
        
        
        public static void main(String[]args){
                int N=sc.nextInt();
                if(N>=195){
                        System.out.println(5);
                }else if(N>=189){
                        System.out.println(4);
                }
                else if(N>=165){
                        System.out.println(3);
                }
                else if(N>=135){
                        System.out.println(2);
                }else if(N>=105){
                        System.out.println(1);
                }else{
                        System.out.println(0);
                }
                
                


                
        }
        
        
        

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


                
        } main {
                int N=sc.nextInt();
                if(N>=195){
                        System.out.println(5);
                }else if(N>=189){
                        System.out.println(4);
                }
                else if(N>=165){
                        System.out.println(3);
                }
                else if(N>=135){
                        System.out.println(2);
                }else if(N>=105){
                        System.out.println(1);
                }else{
                        System.out.println(0);
                }
                
                


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


                
        }
        
        
        

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


                
        }
        
        
        

		
	
} Main
import java.awt.Point;
import java.util.ArrayDeque;
import java.util.Scanner;
import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Collection;


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


                
        }
        
        
        

		
	
}
