import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    }
    
    public static boolean isTrue(int n){
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    }
    
    public static boolean isTrue(int n){
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int out = 0; out 0 for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        } int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
            if(isTrue(i)) out++;
        } {
            if(isTrue(i)) out++;
        } if(isTrue(i)) out++; isTrue(i) isTrue i out++ out System.out.println(out) System.out.println System.out System System.out out scan.close() scan.close scan String[] args args public static boolean isTrue(int n){
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    } isTrue {
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    } int c = 0; c 0 for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        } 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) c++;
            if(c > 4) return false;
        } {
            if(n % i == 0) c++;
            if(c > 4) return false;
        } if(n % i == 0) c++; n % i == 0 n % i n i 0 c++ c if(c > 4) return false; c > 4 c 4 return false; false if(n % Math.sqrt(n) == 0) c++; n % Math.sqrt(n) == 0 n % Math.sqrt(n) n Math.sqrt(n) Math.sqrt Math n 0 c++ c if(c == 4) return true;
        else return false; c == 4 c 4 return true; true return false; false int n n public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    }
    
    public static boolean isTrue(int n){
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    }
    
    public static boolean isTrue(int n){
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(isTrue(i)) out++;
        }
        System.out.println(out);
        scan.close();
    }
    
    public static boolean isTrue(int n){
        int c = 0;
        for(int i = 1; i < Math.sqrt(n); i++){
            if(n % i == 0) c++;
            if(c > 4) return false;
        }
        if(n % Math.sqrt(n) == 0) c++;
        if(c == 4) return true;
        else return false;
    }
}
