import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int res = 0; res 0 for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        } int i = 1; int i = 1; i 1 i <= N i N i += 2 i += 2 i 2 {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        } {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        } int counter = 0; counter 0 for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
                if (i % j == 0) {
                    counter++;
                }
            } {
                if (i % j == 0) {
                    counter++;
                }
            } if (i % j == 0) {
                    counter++;
                } i % j == 0 i % j i j 0 {
                    counter++;
                } counter++ counter if (counter == 8) {
                res++;
            } counter == 8 counter 8 {
                res++;
            } res++ res System.out.println(res) System.out.println System.out System System.out res sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= N; i += 2) {
            int counter = 0;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    counter++;
                }
            }
            if (counter == 8) {
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    }
}