import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    }

    static int nextInt(Scanner sc){
        return Integer.parseInt(sc.next());
    }

    static boolean result(Integer a){
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    }

}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    }

    static int nextInt(Scanner sc){
        return Integer.parseInt(sc.next());
    }

    static boolean result(Integer a){
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Integer a = nextInt(sc); a nextInt(sc) nextInt sc if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        } a < 105 a 105 {
            System.out.println(0);
        } System.out.println(0) System.out.println System.out System System.out 0 {
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        } int num = 1; num 1 for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            } int i = 107; int i = 107; i 107 i <= a i a i+=2 i+=2 i 2 {
                if(result(i)) num++;
            } {
                if(result(i)) num++;
            } if(result(i)) num++; result(i) result i num++ num System.out.println(num) System.out.println System.out System System.out num sc.close() sc.close sc String[] args args static int nextInt(Scanner sc){
        return Integer.parseInt(sc.next());
    } nextInt {
        return Integer.parseInt(sc.next());
    } return Integer.parseInt(sc.next()); Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Scanner sc sc static boolean result(Integer a){
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    } result {
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    } int count = 0; count 0 for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        } int i = 1; int i = 1; i 1 i <= a i a i++ i++ i {
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        } {
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        } if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            } a % i == 0 a % i a i 0 {
                count++;
                if(count > 8){
                    return false;
                }
            } count++ count if(count > 8){
                    return false;
                } count > 8 count 8 {
                    return false;
                } return false; false if(count == 8) {
            return true;
        }else{
            return false;
        } count == 8 count 8 {
            return true;
        } return true; true {
            return false;
        } return false; false Integer a a public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    }

    static int nextInt(Scanner sc){
        return Integer.parseInt(sc.next());
    }

    static boolean result(Integer a){
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    }

    static int nextInt(Scanner sc){
        return Integer.parseInt(sc.next());
    }

    static boolean result(Integer a){
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    }

} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = nextInt(sc);
        if(a < 105) {
            System.out.println(0);
        }else{
            int num = 1;
            for(int i = 107;i <= a;i+=2){
                if(result(i)) num++;
            }
            System.out.println(num);
        }
        sc.close();
    }

    static int nextInt(Scanner sc){
        return Integer.parseInt(sc.next());
    }

    static boolean result(Integer a){
        int count = 0;
        for (int i = 1;i <= a;i++){
            if(a % i == 0) {
                count++;
                if(count > 8){
                    return false;
                }
            }
        }
        if(count == 8) {
            return true;
        }else{
            return false;
        }
    }

}

