import java.util.Scanner;

public class Main {

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

        int N = sc.nextInt();

        System.out.println(solve(N));
    }

    private static int solve(int N) {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    }

    private static boolean check(int a) {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


        return p == 8;
    }
} 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();

        System.out.println(solve(N));
    }

    private static int solve(int N) {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    }

    private static boolean check(int a) {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


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

        int N = sc.nextInt();

        System.out.println(solve(N));
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        System.out.println(solve(N));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc System.out.println(solve(N)) System.out.println System.out System System.out solve(N) solve N String[] args args private static int solve(int N) {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    } solve {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    } int count = 0; count 0 for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            if(check(i)) count++;
        } {
            if(check(i)) count++;
        } if(check(i)) count++; check(i) check i count++ count return count; count int N N private static boolean check(int a) {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


        return p == 8;
    } check {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


        return p == 8;
    } if (a%2 == 0) return false; a%2 == 0 a%2 a 2 0 return false; false int p = 0; p 0 for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        } int i=1; int i=1; i 1 i<=a i a i++ i++ i {
            if (a%i == 0) p++;
        } {
            if (a%i == 0) p++;
        } if (a%i == 0) p++; a%i == 0 a%i a i 0 p++ p return p == 8; p == 8 p 8 int a a public class Main {

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

        int N = sc.nextInt();

        System.out.println(solve(N));
    }

    private static int solve(int N) {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    }

    private static boolean check(int a) {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


        return p == 8;
    }
} public class Main {

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

        int N = sc.nextInt();

        System.out.println(solve(N));
    }

    private static int solve(int N) {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    }

    private static boolean check(int a) {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


        return p == 8;
    }
} Main
import java.util.Scanner;

public class Main {

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

        int N = sc.nextInt();

        System.out.println(solve(N));
    }

    private static int solve(int N) {
        int count = 0;

        for (int i=1; i<=N; i++) {
            if(check(i)) count++;
        }

        return count;
    }

    private static boolean check(int a) {
        if (a%2 == 0) return false;
        int p = 0;

        for (int i=1; i<=a; i++) {
            if (a%i == 0) p++;
        }


        return p == 8;
    }
}
