import java.util.*;


public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	}
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	}
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	} main {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n= sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans=0; ans 0 if(n<105){
            System.out.println(0);
            return;
        } n<105 n 105 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        } int i=105; int i=105; i 105 i<=n i n i++ i++ i {
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        } {
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        } int count=0; count 0 for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            } int j=2; int j=2; j 2 j<i j i j++ j++ j {
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            } {
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            } if(i%j==0){
                    //System.out.println(j);
                    count++;
                } i%j==0 i%j i j 0 {
                    //System.out.println(j);
                    count++;
                } count++ count if(count==6){
                ans++;
            } count==6 count 6 {
                ans++;
            } ans++ ans i++ i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	}
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	}
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int n= sc.nextInt();
        int ans=0;
        
        if(n<105){
            System.out.println(0);
            return;
        }
        
        for(int i=105; i<=n; i++){
            //System.out.println(ans);
            int count=0;
            for(int j=2; j<i; j++){
                //System.out.println(j);
                if(i%j==0){
                    //System.out.println(j);
                    count++;
                }
            }
            if(count==6){
                ans++;
            }
            i++;
        }

        System.out.println(ans);
        
	}
}