import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.Set;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashSet; HashSet java.util import java.util.StringTokenizer; StringTokenizer java.util import java.util.Set; Set java.util import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        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 MyScanner in = new MyScanner(inputStream); in new MyScanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        }

    } B public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        } solve {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        } int N = in.Int(); N in.Int() in.Int in int cnt = 0; cnt 0 Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            } int i = 105; int i = 105; i 105 i <= N i N i += 2 i += 2 i 2 {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            } {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            } set.clear() set.clear set for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                } {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                } if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    } i % j == 0 i % j i j 0 {
                        set.add(j);
                        set.add(i / j);
                    } set.add(j) set.add set j set.add(i / j) set.add set i / j i j if (set.size() == 8) cnt++; set.size() == 8 set.size() set.size set 8 cnt++ cnt out.println(cnt) out.println out cnt int testNumber testNumber MyScanner in in PrintWriter out out static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

    } MyScanner private BufferedReader in; in private StringTokenizer st; st public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        } MyScanner {
            in = new BufferedReader(new InputStreamReader(stream));
        } in = new BufferedReader(new InputStreamReader(stream)) in new BufferedReader(new InputStreamReader(stream)) InputStream stream stream public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } String rl = in.readLine(); rl in.readLine() in.readLine in if (rl == null) {
                        return null;
                    } rl == null rl null {
                        return null;
                    } return null; null st = new StringTokenizer(rl) st new StringTokenizer(rl) return st.nextToken(); st.nextToken() st.nextToken st public int Int() {
            return Integer.parseInt(next());
        } Int {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.Set;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int N = in.Int();
            int cnt = 0;
            Set<Integer> set = new HashSet<>();
            for (int i = 105; i <= N; i += 2) {
                set.clear();
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0) {
                        set.add(j);
                        set.add(i / j);
                    }
                }
                if (set.size() == 8) cnt++;
            }
            out.println(cnt);
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

    }
}

