import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

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

    static class ABC106_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        }

    }
}
 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.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC106_2 solver = new ABC106_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC106_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC106_2 solver = new ABC106_2();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC106_2 solver = new ABC106_2();
        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 Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) ABC106_2 solver = new ABC106_2(); solver new ABC106_2() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC106_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        }

    } ABC106_2 public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        } solve {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        } int N = in.nextInt(); N in.nextInt() in.nextInt in int count = 0; count 0 int anscount = 0; anscount 0 for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            } int j = N; int j = N; j N j >= 0 j 0 j-- j-- j {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            } {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            } for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                } int i = 1; int i = 1; i 1 i <= j i j i++ i++ i {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                } {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                } if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    } (j % i) == 0 (j % i) j i 0 {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    } if ((i % 2) == 1) {
                            count++;
                        } (i % 2) == 1 (i % 2) i 2 1 {
                            count++;
                        } count++ count if (count == 8) {
                    anscount++;
                } count == 8 count 8 {
                    anscount++;
                } anscount++ anscount count = 0 count 0 out.println(anscount) out.println out anscount int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC106_2 solver = new ABC106_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC106_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        }

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

    static class ABC106_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

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

    static class ABC106_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int anscount = 0;
            for (int j = N; j >= 0; j--) {
                for (int i = 1; i <= j; i++) {
                    if ((j % i) == 0) {
                        if ((i % 2) == 1) {
                            count++;
                        }
                    }
                }
                if (count == 8) {
                    anscount++;
                }
                count = 0;
            }
            out.println(anscount);

        }

    }
}

