import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    }

    int f(int n){
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    }


    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.*; util.* java public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    }

    int f(int n){
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    }


    public static void main(String[] args){
        new Main().solve();
    }
} Main void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    } solve {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    } 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(f(i) == 8) out++;
        } int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
            if(f(i) == 8) out++;
        } {
            if(f(i) == 8) out++;
        } if(f(i) == 8) out++; f(i) == 8 f(i) f i 8 out++ out System.out.println(out) System.out.println System.out System System.out out int f(int n){
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    } f {
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    } if(n == 1) return 1; n == 1 n 1 return 1; 1 int ret = 2; ret 2 for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        } int i = 2; int i = 2; i 2 i < Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
            if(n % i == 0) ret += 2;
        } {
            if(n % i == 0) ret += 2;
        } if(n % i == 0) ret += 2; n % i == 0 n % i n i 0 ret += 2 ret 2 if(n % Math.sqrt(n) == 0) ret++; n % Math.sqrt(n) == 0 n % Math.sqrt(n) n Math.sqrt(n) Math.sqrt Math n 0 ret++ ret return ret; ret int n n public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    }

    int f(int n){
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    }


    public static void main(String[] args){
        new Main().solve();
    }
} public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    }

    int f(int n){
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    }


    public static void main(String[] args){
        new Main().solve();
    }
} Main
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int out = 0;
        for(int i = 1; i <= n; i += 2){
            if(f(i) == 8) out++;
        }
        System.out.println(out);
    }

    int f(int n){
        if(n == 1) return 1;
        int ret = 2;
        for(int i = 2; i < Math.sqrt(n); i++){
            if(n % i == 0) ret += 2;
        }
        if(n % Math.sqrt(n) == 0) ret++;
        return ret;
    }


    public static void main(String[] args){
        new Main().solve();
    }
}
