import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    }

    public static int f(int n) {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    }

} 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 ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    }

    public static int f(int n) {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++; int i = 1; int i = 1; i 1 i <= N i N i += 2 i += 2 i 2 if (f(i) == 8) ans++; if (f(i) == 8) ans++; f(i) == 8 f(i) f i 8 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public static int f(int n) {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    } f {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    } int sqrt = (int) Math.sqrt(n); sqrt (int) Math.sqrt(n) Math.sqrt Math n int ans = 0; ans 0 for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            } int i = 1; int i = 1; i 1 i <= sqrt i sqrt i++ i++ i if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            } if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            } n % i == 0 n % i n i 0 {
                ans++;
                if (i * i != n) ans++;
            } ans++ ans if (i * i != n) ans++; i * i != n i * i i i n ans++ ans return ans; ans int n n public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    }

    public static int f(int n) {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    }

    public static int f(int n) {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    }

} 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 ans = 0;
        for (int i = 1; i <= N; i += 2) if (f(i) == 8) ans++;
        System.out.println(ans);
        sc.close();
    }

    public static int f(int n) {
        int sqrt = (int) Math.sqrt(n);
        int ans = 0;
        for (int i = 1; i <= sqrt; i++)
            if (n % i == 0) {
                ans++;
                if (i * i != n) ans++;
            }
        return ans;
    }

}
