import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    int count = 0;

    for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    }
    
    System.out.println(ans);
    
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    int count = 0;

    for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    }
    
    System.out.println(ans);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    int count = 0;

    for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    }
    
    System.out.println(ans);
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    int count = 0;

    for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    }
    
    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 int count = 0; count 0 for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    } int j = 105 ; int j = 105 ; j 105 j <= n j n ++j ++j j { 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    } { 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    } if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      } j%2!=0 j%2 j 2 0 {
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      } for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     } int i = 1 ; int i = 1 ; i 1 i <= j i j ++i ++i i { 
      if(j%i==0){
        count++;
      } 
     } { 
      if(j%i==0){
        count++;
      } 
     } if(j%i==0){
        count++;
      } j%i==0 j%i j i 0 {
        count++;
      } count++ count if(count == 8){
          ans++;
     } count == 8 count 8 {
          ans++;
     } ans++ ans count = 0 count 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    int count = 0;

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

    for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    }
    
    System.out.println(ans);
    
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    int count = 0;

    for(int j = 105 ; j <= n ; ++j){ 
      if(j%2!=0){
   	 for(int i = 1 ; i <= j ; ++i){ 
      if(j%i==0){
        count++;
      } 
     }
      }
     if(count == 8){
          ans++;
     }
     count = 0;
    }
    
    System.out.println(ans);
    
  }
}
