import java.util.*;

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

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