import java.util.*;
public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    }
} Main public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    } main {
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        } N<105 N 105 {
        	System.out.println(0);
        } System.out.println(0) System.out.println System.out System System.out 0 {
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        } int cntnum = 0; cntnum 0 for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            } int i=105; int i=105; i 105 i<=N i N i+=2 i+=2 i 2 {
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            } {
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            } int cnt = 0; cnt 0 for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                } int j=1; int j=1; j 1 j<=N j N j++ j++ j {
                	if(i%j==0){
                    	cnt++;
                    }
                } {
                	if(i%j==0){
                    	cnt++;
                    }
                } if(i%j==0){
                    	cnt++;
                    } i%j==0 i%j i j 0 {
                    	cnt++;
                    } cnt++ cnt if(cnt==8){
                	cntnum++;
                } cnt==8 cnt 8 {
                	cntnum++;
                } cntnum++ cntnum System.out.println(cntnum) System.out.println System.out System System.out cntnum String[] args args public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    }
} public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	if(N<105){
        	System.out.println(0);
        }else{
        	int cntnum = 0;
          	for(int i=105;i<=N;i+=2){
              	int cnt = 0;
            	for(int j=1;j<=N;j++){
                	if(i%j==0){
                    	cnt++;
                    }
                }
              	if(cnt==8){
                	cntnum++;
                }
            }
          	System.out.println(cntnum);
        }
    }
}