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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(input.readLine()); n Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input int count = 0; count 0 for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        } {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        } int count2 = 0; count2 0 if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            } i % 2 != 0 i % 2 i 2 0 {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            } for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
                    if (i % j == 0)
                        count2++;
                } {
                    if (i % j == 0)
                        count2++;
                } if (i % j == 0)
                        count2++; i % j == 0 i % j i j 0 count2++ count2 if (count2 == 8)
                    count++; count2 == 8 count2 8 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) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int count2 = 0;
            if (i % 2 != 0) {
                for (int j = 1; j <= i; j++) {
                    if (i % j == 0)
                        count2++;
                }
                if (count2 == 8)
                    count++;
            }
        }
        System.out.println(count);
    }
}
