import java.util.*;
import java.io.*;
 
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
 
public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
}

class P implements Comparable<P>{
    int id, d;
    P(int  id, int d) {
        this.id=id;
        this.d=d;
    }
    public int compareTo(P p){
        return d-p.d; //des
    }
}

class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.util.Collections.*; import static java.util.Collections.*; public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
} Main static final long mod=1000000007; mod 1000000007 public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    } main {
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    } Reader sc = new Reader(System.in); sc new Reader(System.in) PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans=0; ans 0 for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        } int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        } {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        } int e=i e i d=1 d 1 s=0; s 0 while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            } e>=d*d e d*d d d {
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            } if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                } e%d==0 e%d e d 0 {
                    s+=2;
                    if(d*d==e)s--;
                } s+=2 s 2 if(d*d==e)s--; d*d==e d*d d d e s-- s d++ d if(s==8)ans++; s==8 s 8 ans++ ans out.println(ans) out.println out ans out.flush() out.flush out String[] args args static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    } db {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os class P implements Comparable<P>{
    int id, d;
    P(int  id, int d) {
        this.id=id;
        this.d=d;
    }
    public int compareTo(P p){
        return d-p.d; //des
    }
} P int id id d; d P(int  id, int d) {
        this.id=id;
        this.d=d;
    } P {
        this.id=id;
        this.d=d;
    } this.id=id this.id this this.id id this.d=d this.d this this.d d int  id id int d d public int compareTo(P p){
        return d-p.d; //des
    } compareTo {
        return d-p.d; //des
    } return d-p.d; //des d-p.d d p.d p p.d P p p Comparable class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
} Reader private BufferedReader x; x private StringTokenizer st; st public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    } Reader {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    } x = new BufferedReader(new InputStreamReader(in)) x new BufferedReader(new InputStreamReader(in)) st = null st null InputStream in in public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    } nextString {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    } while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine()); st==null || !st.hasMoreTokens() st==null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(x.readLine()) st new StringTokenizer(x.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    } nextInt {
        return Integer.parseInt(nextString());
    } return Integer.parseInt(nextString()); Integer.parseInt(nextString()) Integer.parseInt Integer nextString() nextString public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    } nextLong {
        return Long.parseLong(nextString());
    } return Long.parseLong(nextString()); Long.parseLong(nextString()) Long.parseLong Long nextString() nextString public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    } nextDouble {
        return Double.parseDouble(nextString());
    } return Double.parseDouble(nextString()); Double.parseDouble(nextString()) Double.parseDouble Double nextString() nextString public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
} public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
} Main
import java.util.*;
import java.io.*;
 
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
 
public class Main{
    static final long mod=1000000007;
    
    public  static void main(String[] args)   throws Exception, IOException{
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
        // int n=sc.nextInt();
        // char c[][] = new char[h][w];
        // char c[]=sc.nextString().toCharArray();
        // for(int i=0; i<n; i++) {d[i]=sc.nextInt();}

        int n=sc.nextInt();
        int ans=0;
        for (int i=1; i<=n; i+=2) {
            int e=i,d=1, s=0;
            while(e>=d*d){
                if(e%d==0){
                    s+=2;
                    if(d*d==e)s--;
                }
                d++;
            }
            if(s==8)ans++;
        }

        out.println(ans);
        out.flush();
    }


    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
}

class P implements Comparable<P>{
    int id, d;
    P(int  id, int d) {
        this.id=id;
        this.d=d;
    }
    public int compareTo(P p){
        return d-p.d; //des
    }
}

class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
}