import java.io.*;
class Program{
    boolean fact(int n){
        int count = 0;
        for(int i=1;i<=Math.sqrt(n);i++){
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        }
        if (count==8) return true;
        else return false;
    }
}
class Main{
    public static void main(String args[])throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Program obj = new Program();
        int count= 0, N = Integer.parseInt(in.readLine());
        for(int i = 1;i<=N;i++){
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        }
        System.out.println(count);
    }
} import java.io.*; io.* java class Program{
    boolean fact(int n){
        int count = 0;
        for(int i=1;i<=Math.sqrt(n);i++){
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        }
        if (count==8) return true;
        else return false;
    }
} Program boolean fact(int n){
        int count = 0;
        for(int i=1;i<=Math.sqrt(n);i++){
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        }
        if (count==8) return true;
        else return false;
    } fact {
        int count = 0;
        for(int i=1;i<=Math.sqrt(n);i++){
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        }
        if (count==8) return true;
        else return false;
    } int count = 0; count 0 for(int i=1;i<=Math.sqrt(n);i++){
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        } int i=1; int i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        } {
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        } if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            } n%i==0 n%i n i 0 {
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            } if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                } i!=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n count+=2 count 2 {
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                } if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2; Math.pow(Math.sqrt(n),2)==n Math.pow(Math.sqrt(n),2) Math.pow Math Math.sqrt(n) Math.sqrt Math n 2 n count+=1 count 1 count+=2 count 2 if (count==8) return true;
        else return false; count==8 count 8 return true; true return false; false int n n class Main{
    public static void main(String args[])throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Program obj = new Program();
        int count= 0, N = Integer.parseInt(in.readLine());
        for(int i = 1;i<=N;i++){
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String args[])throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Program obj = new Program();
        int count= 0, N = Integer.parseInt(in.readLine());
        for(int i = 1;i<=N;i++){
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        }
        System.out.println(count);
    } main {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Program obj = new Program();
        int count= 0, N = Integer.parseInt(in.readLine());
        for(int i = 1;i<=N;i++){
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        }
        System.out.println(count);
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) Program obj = new Program(); obj new Program() int count= 0 count 0 N = Integer.parseInt(in.readLine()); N Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in for(int i = 1;i<=N;i++){
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        } int i = 1; int i = 1; i 1 i<=N i N i++ i++ i {
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        } {
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        } if(i%2==1){
                if(obj.fact(i)) count++;
            } i%2==1 i%2 i 2 1 {
                if(obj.fact(i)) count++;
            } if(obj.fact(i)) count++; obj.fact(i) obj.fact obj i count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args
import java.io.*;
class Program{
    boolean fact(int n){
        int count = 0;
        for(int i=1;i<=Math.sqrt(n);i++){
            if (n%i==0){
                if (i!=Math.sqrt(n)) count+=2;
                else{
                    if (Math.pow(Math.sqrt(n),2)==n) count+=1;
                    else count+=2;
                }
            }
        }
        if (count==8) return true;
        else return false;
    }
}
class Main{
    public static void main(String args[])throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Program obj = new Program();
        int count= 0, N = Integer.parseInt(in.readLine());
        for(int i = 1;i<=N;i++){
            if(i%2==1){
                if(obj.fact(i)) count++;
            }
        }
        System.out.println(count);
    }
}