import java.util.*;
import java.util.Arrays;
public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int result = 0;
       
        for(int i=1;i<=n;i=i+2){
            int count =0;
            for(int j=1;j<=i;j++){
                if(i%j==0){
                    count++;
                }
                if(count==8){
                    
                    result++;
                }
            }
            
        }


        System.out.println(result);
    


    }
} import java.util.*; util.* java import java.util.Arrays; Arrays java.util public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int result = 0;
       
        for(int i=1;i<=n;i=i+2){
            int count =0;
            for(int j=1;j<=i;j++){
                if(i%j==0){
                    count++;
                }
                if(count==8){
                    
                    result++;
                }
            }
            
        }


        System.out.println(result);
    


    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int result = 0;
       
        for(int i=1;i<=n;i=i+2){
            int count =0;
            for(int j=1;j<=i;j++){
                if(i%j==0){
                    count++;
                }
                if(count==8){
                    
                    result++;
                }
            }
            
        }


        System.out.println(result);
    


    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int result = 0;
       
        for(int i=1;i<=n;i=i+2){
            int count =0;
            for(int j=1;j<=i;j++){
                if(i%j==0){
                    count++;
                }
                if(count==8){
                    
                    result++;
                }
            }
            
        }


        System.out.println(result);
    


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


        System.out.println(result);
    


    }
} public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int result = 0;
       
        for(int i=1;i<=n;i=i+2){
            int count =0;
            for(int j=1;j<=i;j++){
                if(i%j==0){
                    count++;
                }
                if(count==8){
                    
                    result++;
                }
            }
            
        }


        System.out.println(result);
    


    }
} Main
import java.util.*;
import java.util.Arrays;
public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int result = 0;
       
        for(int i=1;i<=n;i=i+2){
            int count =0;
            for(int j=1;j<=i;j++){
                if(i%j==0){
                    count++;
                }
                if(count==8){
                    
                    result++;
                }
            }
            
        }


        System.out.println(result);
    


    }
}