import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        }

    }

    // other template
    static int min(int a, int b) {
        return Math.min(a, b);
    }

    static long min(long a, long b) {
        return Math.min(a, b);
    }

    static void fill(int[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(long[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(char[][] a, char c) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    }

    static int max(int a, int b) {
        return Math.max(a, b);
    }

    static long max(long a, long b) {
        return Math.max(a, b);
    }

    // faster input template
    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public double nextDouble() {
            return Double.parseDouble(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

        public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        }

        public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }
    }

} import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(String[] args) throws IOException {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        }

    }

    // other template
    static int min(int a, int b) {
        return Math.min(a, b);
    }

    static long min(long a, long b) {
        return Math.min(a, b);
    }

    static void fill(int[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(long[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(char[][] a, char c) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    }

    static int max(int a, int b) {
        return Math.max(a, b);
    }

    static long max(long a, long b) {
        return Math.max(a, b);
    }

    // faster input template
    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public double nextDouble() {
            return Double.parseDouble(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

        public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        }

        public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }
    }

} Main public static void main(String[] args) throws IOException {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    } main {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskA solver = new TaskA(); solver new TaskA() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args // other template
    static int min(int a, int b) {
        return Math.min(a, b);
    } min {
        return Math.min(a, b);
    } return Math.min(a, b); Math.min(a, b) Math.min Math a b int a a int b b static long min(long a, long b) {
        return Math.min(a, b);
    } min {
        return Math.min(a, b);
    } return Math.min(a, b); Math.min(a, b) Math.min Math a b long a a long b b static void fill(int[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    } fill {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    } for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            Arrays.fill(a[i], value);
        } {
            Arrays.fill(a[i], value);
        } Arrays.fill(a[i], value) Arrays.fill Arrays a[i] a i value int[][] a a int value value static void fill(long[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    } fill {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    } for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            Arrays.fill(a[i], value);
        } {
            Arrays.fill(a[i], value);
        } Arrays.fill(a[i], value) Arrays.fill Arrays a[i] a i value long[][] a a int value value static void fill(char[][] a, char c) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    } fill {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    } for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            Arrays.fill(a[i], c);
        } {
            Arrays.fill(a[i], c);
        } Arrays.fill(a[i], c) Arrays.fill Arrays a[i] a i c char[][] a a char c c static int max(int a, int b) {
        return Math.max(a, b);
    } max {
        return Math.max(a, b);
    } return Math.max(a, b); Math.max(a, b) Math.max Math a b int a a int b b static long max(long a, long b) {
        return Math.max(a, b);
    } max {
        return Math.max(a, b);
    } return Math.max(a, b); Math.max(a, b) Math.max Math a b long a a long b b static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        }

    } TaskA public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        } solve {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int cnt; cnt int cnt_8 = 0; cnt_8 0 for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            } int i=1; int i=1; i 1 i <= N i N {
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            } {
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            } cnt = 0 cnt 0 for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                } int j=1; int j=1; j 1 j <= N j N j++ j++ j {
                    if(i%j == 0)  cnt++;
                } {
                    if(i%j == 0)  cnt++;
                } if(i%j == 0)  cnt++; i%j == 0 i%j i j 0 cnt++ cnt if(cnt == 8) cnt_8++; cnt == 8 cnt 8 cnt_8++ cnt_8 i=i+2 i i+2 i 2 out.println(cnt_8) out.println out cnt_8 int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public double nextDouble() {
            return Double.parseDouble(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

        public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        }

        public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }
    } InputReader BufferedReader in; in StringTokenizer tok; tok public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        } nextString {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        } while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            } !tok.hasMoreTokens() tok.hasMoreTokens() tok.hasMoreTokens tok {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            } try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                } catch (IOException e) {
                    throw new InputMismatchException();
                } IOException e {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() {
                    tok = new StringTokenizer(in.readLine(), " ");
                } tok = new StringTokenizer(in.readLine(), " ") tok new StringTokenizer(in.readLine(), " ") return tok.nextToken(); tok.nextToken() tok.nextToken tok public int nextInt() {
            return Integer.parseInt(nextString());
        } nextInt {
            return Integer.parseInt(nextString());
        } return Integer.parseInt(nextString()); Integer.parseInt(nextString()) Integer.parseInt Integer nextString() nextString public long nextLong() {
            return Long.parseLong(nextString());
        } nextLong {
            return Long.parseLong(nextString());
        } return Long.parseLong(nextString()); Long.parseLong(nextString()) Long.parseLong Long nextString() nextString public double nextDouble() {
            return Double.parseDouble(nextString());
        } nextDouble {
            return Double.parseDouble(nextString());
        } return Double.parseDouble(nextString()); Double.parseDouble(nextString()) Double.parseDouble Double nextString() nextString public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        } nextIntArray {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        } int[] res = new int[n]; res new int[n] n for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                res[i] = nextInt();
            } {
                res[i] = nextInt();
            } res[i] = nextInt() res[i] res i nextInt() nextInt return res; res int n n public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        } nextIntArrayDec {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        } int[] res = new int[n]; res new int[n] n for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                res[i] = nextInt() - 1;
            } {
                res[i] = nextInt() - 1;
            } res[i] = nextInt() - 1 res[i] res i nextInt() - 1 nextInt() nextInt 1 return res; res int n n public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        } nextLongArray {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        } long[] res = new long[n]; res new long[n] n for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                res[i] = nextLong();
            } {
                res[i] = nextLong();
            } res[i] = nextLong() res[i] res i nextLong() nextLong return res; res int n n public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        } nextLongArrayDec {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        } long[] res = new long[n]; res new long[n] n for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                res[i] = nextLong() - 1;
            } {
                res[i] = nextLong() - 1;
            } res[i] = nextLong() - 1 res[i] res i nextLong() - 1 nextLong() nextLong 1 return res; res int n n public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        } InputReader {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        } in = new BufferedReader(new InputStreamReader(inputStream)) in new BufferedReader(new InputStreamReader(inputStream)) tok = new StringTokenizer("") tok new StringTokenizer("") InputStream inputStream inputStream public class Main {

    public static void main(String[] args) throws IOException {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        }

    }

    // other template
    static int min(int a, int b) {
        return Math.min(a, b);
    }

    static long min(long a, long b) {
        return Math.min(a, b);
    }

    static void fill(int[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(long[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(char[][] a, char c) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    }

    static int max(int a, int b) {
        return Math.max(a, b);
    }

    static long max(long a, long b) {
        return Math.max(a, b);
    }

    // faster input template
    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public double nextDouble() {
            return Double.parseDouble(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

        public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        }

        public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }
    }

} public class Main {

    public static void main(String[] args) throws IOException {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        }

    }

    // other template
    static int min(int a, int b) {
        return Math.min(a, b);
    }

    static long min(long a, long b) {
        return Math.min(a, b);
    }

    static void fill(int[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(long[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(char[][] a, char c) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    }

    static int max(int a, int b) {
        return Math.max(a, b);
    }

    static long max(long a, long b) {
        return Math.max(a, b);
    }

    // faster input template
    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public double nextDouble() {
            return Double.parseDouble(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

        public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        }

        public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }
    }

} Main
import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        // write your code here
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();

    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();

            int cnt;
            int cnt_8 = 0;

            for(int i=1; i <= N; ){
                cnt = 0;
                for(int j=1; j <= N; j++){
                    if(i%j == 0)  cnt++;
                }
                if(cnt == 8) cnt_8++;
                i=i+2;
            }

             out.println(cnt_8);
        }

    }

    // other template
    static int min(int a, int b) {
        return Math.min(a, b);
    }

    static long min(long a, long b) {
        return Math.min(a, b);
    }

    static void fill(int[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(long[][] a, int value) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], value);
        }
    }

    static void fill(char[][] a, char c) {
        for (int i = 0; i < a.length; i++) {
            Arrays.fill(a[i], c);
        }
    }

    static int max(int a, int b) {
        return Math.max(a, b);
    }

    static long max(long a, long b) {
        return Math.max(a, b);
    }

    // faster input template
    static class InputReader {
        BufferedReader in;
        StringTokenizer tok;

        public String nextString() {
            while (!tok.hasMoreTokens()) {
                try {
                    tok = new StringTokenizer(in.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return tok.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public long nextLong() {
            return Long.parseLong(nextString());
        }

        public double nextDouble() {
            return Double.parseDouble(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

        public int[] nextIntArrayDec(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt() - 1;
            }
            return res;
        }

        public long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long[] nextLongArrayDec(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextLong() - 1;
            }
            return res;
        }

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
            tok = new StringTokenizer("");
        }
    }

}
