import java.util.*;

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(helper(i)==8) ans++;
        }
        System.out.println(ans);
    }
    public static int helper(int N){
        int up = (int) Math.floor(Math.sqrt(N));
        int cnt=2;
        for(int i=2;i<=N-1;i++){
            if(N%i==0) cnt++;
        }
        return cnt;
    }
} import java.util.*; util.* java 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(helper(i)==8) ans++;
        }
        System.out.println(ans);
    }
    public static int helper(int N){
        int up = (int) Math.floor(Math.sqrt(N));
        int cnt=2;
        for(int i=2;i<=N-1;i++){
            if(N%i==0) cnt++;
        }
        return cnt;
    }
} 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(helper(i)==8) ans++;
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for(int i=1;i<=N;i+=2){
            if(helper(i)==8) ans++;
        }
        System.out.println(ans);
    } 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(helper(i)==8) ans++;
        } int i=1; int i=1; i 1 i<=N i N i+=2 i+=2 i 2 {
            if(helper(i)==8) ans++;
        } {
            if(helper(i)==8) ans++;
        } if(helper(i)==8) ans++; helper(i)==8 helper(i) helper i 8 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int helper(int N){
        int up = (int) Math.floor(Math.sqrt(N));
        int cnt=2;
        for(int i=2;i<=N-1;i++){
            if(N%i==0) cnt++;
        }
        return cnt;
    } helper {
        int up = (int) Math.floor(Math.sqrt(N));
        int cnt=2;
        for(int i=2;i<=N-1;i++){
            if(N%i==0) cnt++;
        }
        return cnt;
    } int up = (int) Math.floor(Math.sqrt(N)); up (int) Math.floor(Math.sqrt(N)) Math.floor Math Math.sqrt(N) Math.sqrt Math N int cnt=2; cnt 2 for(int i=2;i<=N-1;i++){
            if(N%i==0) cnt++;
        } int i=2; int i=2; i 2 i<=N-1 i N-1 N 1 i++ i++ i {
            if(N%i==0) cnt++;
        } {
            if(N%i==0) cnt++;
        } if(N%i==0) cnt++; N%i==0 N%i N i 0 cnt++ cnt return cnt; cnt int N N
import java.util.*;

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(helper(i)==8) ans++;
        }
        System.out.println(ans);
    }
    public static int helper(int N){
        int up = (int) Math.floor(Math.sqrt(N));
        int cnt=2;
        for(int i=2;i<=N-1;i++){
            if(N%i==0) cnt++;
        }
        return cnt;
    }
}
