import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        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();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        System.out.println(ans);
        
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        System.out.println(ans);
        
    } main {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        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 boolean[] isPrime = new boolean[N+1]; isPrime new boolean[N+1] N+1 N 1 Arrays.fill(isPrime, true) Arrays.fill Arrays isPrime true isPrime[0] = false isPrime[0] isPrime 0 false isPrime[1] = false isPrime[1] isPrime 1 false for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        } int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        } {
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        } if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            } isPrime[i] isPrime i {
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            } for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                } int j = i*2; int j = i*2; j i*2 i 2 j <= N j N j+=i j+=i j i {
                    isPrime[j] = false;
                } {
                    isPrime[j] = false;
                } isPrime[j] = false isPrime[j] isPrime j false int ans = 0; ans 0 for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        } int i = 1; int i = 1; i 1 i <= N i N i+=2 i+=2 i 2 {
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        } {
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        } int[] primes = new int[N+1]; primes new int[N+1] N+1 N 1 for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            } int j = 2; int j = 2; j 2 j <= N j N j++ j++ j {
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            } {
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            } if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                } isPrime[j] isPrime j {
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                } int target = i; target i while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    } target % j== 0 target % j target j 0 {
                        target /= j;
                        primes[j]++;
                    } target /= j target j primes[j]++ primes[j] primes j int cnt = 1; cnt 1 for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            } int j = 2; int j = 2; j 2 j <= N j N j++ j++ j {
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            } {
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            } if( primes[j] > 0 ) cnt *= (primes[j]+1); primes[j] > 0 primes[j] primes j 0 cnt *= (primes[j]+1) cnt (primes[j]+1) primes[j] primes j 1 if(cnt == 8) ans++; cnt == 8 cnt 8 ans++ ans 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();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        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();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        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();
        
        boolean[] isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i <= N; i++){
            if(isPrime[i]){
                for(int j = i*2; j <= N; j+=i){
                    isPrime[j] = false;
                }
            }
        }
        
        int ans = 0;
        for(int i = 1; i <= N; i+=2){
            int[] primes = new int[N+1];
            for(int j = 2; j <= N; j++){
                if(isPrime[j]){
                    int target = i;
                    while( target % j== 0 ){
                        target /= j;
                        primes[j]++;
                    }
                }
            }
            
            int cnt = 1;
            for(int j = 2; j <= N; j++){
                if( primes[j] > 0 ) cnt *= (primes[j]+1);
            }
            if(cnt == 8) ans++;
        }
        
        System.out.println(ans);
        
    }
}
