import java.util.Arrays;
import java.util.*;
public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  }
} import java.util.Arrays; Arrays java.util 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 i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  } main {
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int i i m; m int count = 0; count 0 int total = 0; total 0 for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      } i=1; i=1 i 1 i<=n i n i+=2,count=0 i+=2 i 2 count=0 count 0 {
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      } {
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      } for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        } m=1; m=1 m 1 m<=i m i m++ m++ m {
          if(i%m==0){
            count++;
          }
        } {
          if(i%m==0){
            count++;
          }
        } if(i%m==0){
            count++;
          } i%m==0 i%m i m 0 {
            count++;
          } count++ count if(count==8){
          total++;
        } count==8 count 8 {
          total++;
        } total++ total System.out.println(total) System.out.println System.out System System.out total String args[] args public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  }
} public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  }
} Main
import java.util.Arrays;
import java.util.*;
public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int i,m;
      int count = 0;
      int total = 0;
      for(i=1;i<=n;i+=2,count=0){
        for(m=1;m<=i;m++){
          if(i%m==0){
            count++;
          }
        }
        if(count==8){
          total++;
        }
      }
      
      System.out.println(total);
  }
}
