import java.util.*;
import java.io.*;

public class Main {
    public static int count(int k){
        int ans = 0;
        for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        }
        return ans;
    }
    public static int solve(int N){
        int ans = 0;
        for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        }
        return ans;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        System.out.println(solve(N));
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static int count(int k){
        int ans = 0;
        for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        }
        return ans;
    }
    public static int solve(int N){
        int ans = 0;
        for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        }
        return ans;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        System.out.println(solve(N));
    }
} Main public static int count(int k){
        int ans = 0;
        for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        }
        return ans;
    } count {
        int ans = 0;
        for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        }
        return ans;
    } int ans = 0; ans 0 for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        } int i=1; int i=1; i 1 i*i<=k i*i i i k i++ i++ i {
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        } {
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        } if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	} k%i==0 k%i k i 0 {
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	} if(i*i==k) ans+=1;
        	    else ans+=2; i*i==k i*i i i k ans+=1 ans 1 ans+=2 ans 2 return ans; ans int k k public static int solve(int N){
        int ans = 0;
        for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        }
        return ans;
    } solve {
        int ans = 0;
        for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        }
        return ans;
    } int ans = 0; ans 0 for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
        	if(i%2!=0 && count(i)==8)ans++;
        } {
        	if(i%2!=0 && count(i)==8)ans++;
        } if(i%2!=0 && count(i)==8)ans++; i%2!=0 && count(i)==8 i%2!=0 i%2 i 2 0 count(i)==8 count(i) count i 8 ans++ ans return ans; ans int N N 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 public class Main {
    public static int count(int k){
        int ans = 0;
        for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        }
        return ans;
    }
    public static int solve(int N){
        int ans = 0;
        for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        }
        return ans;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        System.out.println(solve(N));
    }
} public class Main {
    public static int count(int k){
        int ans = 0;
        for(int i=1;i*i<=k;i++){
        	if(k%i==0){
        	    if(i*i==k) ans+=1;
        	    else ans+=2;
        	}
        }
        return ans;
    }
    public static int solve(int N){
        int ans = 0;
        for(int i=1;i<=N;i++){
        	if(i%2!=0 && count(i)==8)ans++;
        }
        return ans;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        System.out.println(solve(N));
    }
} Main
import java.util.*;
import java.io.*;

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