import java.util.*;
import java.util.ArrayList;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    }
    public static long search(long num){
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    }
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    }
    public static long search(long num){
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int count=0; count 0 for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        } int i=1; int i=1; i 1 i<n+1 i n+1 n 1 i++ i++ i {
            if (search(i)==8&&i%2==1){
                count++;
            }
        } {
            if (search(i)==8&&i%2==1){
                count++;
            }
        } if (search(i)==8&&i%2==1){
                count++;
            } search(i)==8&&i%2==1 search(i)==8 search(i) search i 8 i%2==1 i%2 i 2 1 {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static long search(long num){
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    } search {
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    } ArrayList<Long> ff = new ArrayList<Long>(); ff new ArrayList<Long>() for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        } long i = 2; long i = 2; i 2 i <= num i num i++ i++ i {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        } {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        } if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            } num % i == 0 num % i num i 0 {
                num /= i;
                ff.add(i);
                i = 1;
            } num /= i num i ff.add(i) ff.add ff i i = 1 i 1 ArrayList<Long> dd = new ArrayList<Long>(); dd new ArrayList<Long>() dd = (ArrayList<Long>) ff.clone() dd (ArrayList<Long>) ff.clone() ff.clone ff ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd)); ee new ArrayList<Long>(new LinkedHashSet<>(dd)) long[] d = new long[ee.size()]; d new long[ee.size()] ee.size() ee.size ee for (long g:d){
            g = 0;
        } long g d {
            g = 0;
        } {
            g = 0;
        } g = 0 g 0 for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        } int i = 0; int i = 0; i 0 i < ee.size() i ee.size() ee.size ee i++ i++ i {
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        } {
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        } for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            } long k dd {
                if (ee.get(i) == k){
                    d[i]++;
                }
            } {
                if (ee.get(i) == k){
                    d[i]++;
                }
            } if (ee.get(i) == k){
                    d[i]++;
                } ee.get(i) == k ee.get(i) ee.get ee i k {
                    d[i]++;
                } d[i]++ d[i] d i long ans = 1; ans 1 for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        } int i = 0; int i = 0; i 0 i < d.length i d.length d d.length i++ i++ i {
            ans = ans * (d[i]+1);
        } {
            ans = ans * (d[i]+1);
        } ans = ans * (d[i]+1) ans ans * (d[i]+1) ans (d[i]+1) d[i] d i 1 return ans; ans long num num public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    }
    public static long search(long num){
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    }
    public static long search(long num){
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    }
} Main
import java.util.*;
import java.util.ArrayList;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count=0;
        for (int i=1;i<n+1;i++){
            if (search(i)==8&&i%2==1){
                count++;
            }
        }
        System.out.println(count);
    }
    public static long search(long num){
        ArrayList<Long> ff = new ArrayList<Long>();
        for (long i = 2; i <= num; i++) {
            if (num % i == 0) {
                num /= i;
                ff.add(i);
                i = 1;
            }
        }
        ArrayList<Long> dd = new ArrayList<Long>();
        dd = (ArrayList<Long>) ff.clone();
        ArrayList<Long> ee = new ArrayList<Long>(new LinkedHashSet<>(dd));
        long[] d = new long[ee.size()];
        for (long g:d){
            g = 0;
        }
        for (int i = 0;i < ee.size();i++){
            for (long k:dd){
                if (ee.get(i) == k){
                    d[i]++;
                }
            }
        }
        long ans = 1;
        for (int i = 0;i < d.length;i++){
            ans = ans * (d[i]+1);
        }
        return ans;
    }
}