import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String args[]) {

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    }

    private static int numOfDivisors(int n) {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    }

} import java.util.Scanner; Scanner java.util public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String args[]) {

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    }

    private static int numOfDivisors(int n) {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    }

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

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    } main {

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        } int i=105; int i=105; i 105 i <= n i n i += 2 i += 2 i 2 {
            if (numOfDivisors(i) == 8)
                count++;
        } {
            if (numOfDivisors(i) == 8)
                count++;
        } if (numOfDivisors(i) == 8)
                count++; numOfDivisors(i) == 8 numOfDivisors(i) numOfDivisors i 8 count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args private static int numOfDivisors(int n) {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    } numOfDivisors {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    } int c = 0; c 0 for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        } int i=1; int i=1; i 1 i <= n i n i++ i++ i {
            if (n % i == 0)
                c++;
        } {
            if (n % i == 0)
                c++;
        } if (n % i == 0)
                c++; n % i == 0 n % i n i 0 c++ c return c; c int n n public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String args[]) {

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    }

    private static int numOfDivisors(int n) {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    }

} public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String args[]) {

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    }

    private static int numOfDivisors(int n) {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    }

} Main
import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String args[]) {

        int n = sc.nextInt();


        int count = 0;
        for (int i=105; i <= n; i += 2) {
            if (numOfDivisors(i) == 8)
                count++;
        }

        System.out.println(count);


    }

    private static int numOfDivisors(int n) {
        int c = 0;
        for (int i=1; i <= n; i++) {
            if (n % i == 0)
                c++;
        }
        return c;
    }

}
