import java.util.*;

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

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int val1 = sc.nextInt(); val1 sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        } int i = 9; int i = 9; i 9 i <= val1 i val1 i = i + 2 i = i + 2 i i + 2 i 2 {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        } {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        } int temp = 0; temp 0 for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            } int n = 1; int n = 1; n 1 n <= i n i n++ n++ n {
                if ((i % n) == 0) {
                    temp++;
                }
            } {
                if ((i % n) == 0) {
                    temp++;
                }
            } if ((i % n) == 0) {
                    temp++;
                } (i % n) == 0 (i % n) i n 0 {
                    temp++;
                } temp++ temp if (temp == 8) {
                count++;
            } temp == 8 temp 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) {
        Scanner sc = new Scanner(System.in);

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    }
} Main
import java.util.*;

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

        int val1 = sc.nextInt();

        int count = 0;
        for (int i = 9; i <= val1; i = i + 2) {
            int temp = 0;
            for (int n = 1; n <= i; n++) {
                if ((i % n) == 0) {
                    temp++;
                }
            }
            if (temp == 8) {
                count++;
            }
        }
        System.out.println(count);
    }
}