import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count = 0;
        for(int i = 0; 2 * i + 1 <= n; i++)
            count += checkNum(2 * i + 1);
        System.out.println(count);
    }

    public static int checkNum(int n){
        int count = 0;
        for(int i = 1; i <= n; i++) {
            if (n % i == 0)
                count++;
            if(count > 8)
                return 0;
        }
        if(count == 8)
            return 1;
        else
            return 0;
    }
} 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 count = 0;
        for(int i = 0; 2 * i + 1 <= n; i++)
            count += checkNum(2 * i + 1);
        System.out.println(count);
    }

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

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

    public static int checkNum(int n){
        int count = 0;
        for(int i = 1; i <= n; i++) {
            if (n % i == 0)
                count++;
            if(count > 8)
                return 0;
        }
        if(count == 8)
            return 1;
        else
            return 0;
    }
} 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 count = 0;
        for(int i = 0; 2 * i + 1 <= n; i++)
            count += checkNum(2 * i + 1);
        System.out.println(count);
    }

    public static int checkNum(int n){
        int count = 0;
        for(int i = 1; i <= n; i++) {
            if (n % i == 0)
                count++;
            if(count > 8)
                return 0;
        }
        if(count == 8)
            return 1;
        else
            return 0;
    }
}
