import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    } main {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    } BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); br new BufferedReader(new java.io.InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int N = Integer.parseInt(st.nextToken()); N Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int ans = 0; ans 0 for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        } int i = 3; int i = 3; i 3 i <= N i N i += 2 i += 2 i 2 {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        } {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        } int divisor = 0; divisor 0 for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            } int j = 1; int j = 1; j 1 j * j < i j * j j j i j += 2 j += 2 j 2 {
                if(i % j == 0) {
                    divisor += 2;
                }
            } {
                if(i % j == 0) {
                    divisor += 2;
                }
            } if(i % j == 0) {
                    divisor += 2;
                } i % j == 0 i % j i j 0 {
                    divisor += 2;
                } divisor += 2 divisor 2 if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            } divisor == 8 divisor 8 {
                ans += 1;
                // pw.println(i);
            } ans += 1 ans 1 pw.print(ans) pw.print pw ans br.close() br.close br pw.close() pw.close pw String[] args args public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        int N = Integer.parseInt(st.nextToken());

        int ans = 0;
        
        for(int i = 3; i <= N; i += 2) {

            int divisor = 0;
            for(int j = 1; j * j < i; j += 2) {
                if(i % j == 0) {
                    divisor += 2;
                }
            }

            if(divisor == 8) {
                ans += 1;
                // pw.println(i);
            }
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
}