import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int r = 0; r 0 for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        } {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        } int sum = 0; sum 0 for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            } {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            } if (j % 2 != 0 && i % j == 0) {
                    sum++;
                } j % 2 != 0 && i % j == 0 j % 2 != 0 j % 2 j 2 0 i % j == 0 i % j i j 0 {
                    sum++;
                } sum++ sum if (sum == 8) r++; sum == 8 sum 8 r++ r System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            int sum = 0;
            for (int j = 1; j <= i; j++) {
                if (j % 2 != 0 && i % j == 0) {
                    sum++;
                }
            }
            if (sum == 8) r++;
        }
        System.out.println(r);
    }
}