import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    }
} Main public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    } main {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    } try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        } {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        } BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in)) BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in)) new BufferedReader(
                new InputStreamReader(System.in)) final String s = reader.readLine(); s reader.readLine() reader.readLine reader int N = Integer.parseInt(s); N Integer.parseInt(s) Integer.parseInt Integer s int ans = 0; ans 0 for (int i = 1; i <= N; i++) {
                int cnt = 0;
                for (int j = 1; j <= i; j++) {
                    if (i % 2 == 1 && i % j == 0) cnt++;
                }
                if (cnt == 8) ans++;
            } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
                int cnt = 0;
                for (int j = 1; j <= i; j++) {
                    if (i % 2 == 1 && i % j == 0) cnt++;
                }
                if (cnt == 8) ans++;
            } {
                int cnt = 0;
                for (int j = 1; j <= i; j++) {
                    if (i % 2 == 1 && i % j == 0) cnt++;
                }
                if (cnt == 8) ans++;
            } int cnt = 0; cnt 0 for (int j = 1; j <= i; j++) {
                    if (i % 2 == 1 && i % j == 0) cnt++;
                } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
                    if (i % 2 == 1 && i % j == 0) cnt++;
                } {
                    if (i % 2 == 1 && i % j == 0) cnt++;
                } if (i % 2 == 1 && i % j == 0) cnt++; i % 2 == 1 && i % j == 0 i % 2 == 1 i % 2 i 2 1 i % j == 0 i % j i j 0 cnt++ cnt if (cnt == 8) ans++; cnt == 8 cnt 8 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    }
} Main
import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            int N = Integer.parseInt(s);

            int ans = 0;

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

            System.out.println(ans);
        }
    }
}
