import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    }
} Main public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    } main {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    } try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        } catch(Exception e){
            System.out.println(e);
        } Exception e {
            System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br 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++;
                    //System.out.println(i);
                }
            } 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++;
                    //System.out.println(i);
                }
            } {
                int count = 0;
                
                for(int j=1; j<=i; j++){
                    if(i%j == 0){
                        count++;
                    }
                }
                
                if(count == 8){
                    result++;
                    //System.out.println(i);
                }
            } int count = 0; count 0 for(int j=1; j<=i; j++){
                    if(i%j == 0){
                        count++;
                    }
                } int j=1; int j=1; j 1 j<=i j i j++ j++ j {
                    if(i%j == 0){
                        count++;
                    }
                } {
                    if(i%j == 0){
                        count++;
                    }
                } if(i%j == 0){
                        count++;
                    } i%j == 0 i%j i j 0 {
                        count++;
                    } count++ count if(count == 8){
                    result++;
                    //System.out.println(i);
                } count == 8 count 8 {
                    result++;
                    //System.out.println(i);
                } 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) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    }
} Main
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        try{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            
            int N = Integer.parseInt(br.readLine());
            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(i);
                }
            }
            
            System.out.println(result);
            
        }catch(Exception e){
            System.out.println(e);
        }
    }
}