import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }

} Main public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    } try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        } {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int count = 0; count 0 for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            } int n = 1; int n = 1; n 1 n <= N n N n += 2 n += 2 n 2 {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            } {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            } int count2 = 0; count2 0 for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                } int d = 1; int d = 1; d 1 d <= n d n d++ d++ d {
                    if (n % d == 0) {
                        count2++;
                    }
                } {
                    if (n % d == 0) {
                        count2++;
                    }
                } if (n % d == 0) {
                        count2++;
                    } n % d == 0 n % d n d 0 {
                        count2++;
                    } count2++ count2 if (count2 == 8) {
                    count++;
                } count2 == 8 count2 8 {
                    count++;
                } count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }

} public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }

} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int count = 0;
            for (int n = 1; n <= N; n += 2) {
                int count2 = 0;
                for (int d = 1; d <= n; d++) {
                    if (n % d == 0) {
                        count2++;
                    }
                }
                if (count2 == 8) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }

}
