/*
 * Click `Run` to execute the snippet below!
 */
 
import java.io.*;
import java.util.*;

/*
 * To execute Java, please define "static void main" on a class
 * named Solution.
 *
 * If you need more classes, simply define them inline.
 */

public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    }
    System.out.println(ans);
    
    
    
    
    
    /*
    Scanner sc = new Scanner (System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++){
            if (i%2 != 0){
              int factorCount = 0;
                for (int j = 1; j <= i; i++){
                    if (i%j==0) factorCount++;
                }
                if (factorCount == 8) count++;
            }
        }
    */
  }
} import java.io.*; io.* java 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;
    for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    }
    System.out.println(ans);
    
    
    
    
    
    /*
    Scanner sc = new Scanner (System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++){
            if (i%2 != 0){
              int factorCount = 0;
                for (int j = 1; j <= i; i++){
                    if (i%j==0) factorCount++;
                }
                if (factorCount == 8) count++;
            }
        }
    */
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    }
    System.out.println(ans);
    
    
    
    
    
    /*
    Scanner sc = new Scanner (System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++){
            if (i%2 != 0){
              int factorCount = 0;
                for (int j = 1; j <= i; i++){
                    if (i%j==0) factorCount++;
                }
                if (factorCount == 8) count++;
            }
        }
    */
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    }
    System.out.println(ans);
    
    
    
    
    
    /*
    Scanner sc = new Scanner (System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++){
            if (i%2 != 0){
              int factorCount = 0;
                for (int j = 1; j <= i; i++){
                    if (i%j==0) factorCount++;
                }
                if (factorCount == 8) count++;
            }
        }
    */
  } 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 for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    } int n = 1; int n = 1; n 1 n<=N n N n++ n++ n {
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    } {
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    } if(n%2 == 0){
        continue; 
      } n%2 == 0 n%2 n 2 0 {
        continue; 
      } continue; int cnt = 0; cnt 0 for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      } int j = 1; int j = 1; j 1 j<=n j n j++ j++ j {
        if(n%j == 0){
          cnt++; 
        }
      } {
        if(n%j == 0){
          cnt++; 
        }
      } if(n%j == 0){
          cnt++; 
        } n%j == 0 n%j n j 0 {
          cnt++; 
        } cnt++ cnt if(cnt == 8){
        ans++; 
      } cnt == 8 cnt 8 {
        ans++; 
      } ans++ ans 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;
    for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    }
    System.out.println(ans);
    
    
    
    
    
    /*
    Scanner sc = new Scanner (System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++){
            if (i%2 != 0){
              int factorCount = 0;
                for (int j = 1; j <= i; i++){
                    if (i%j==0) factorCount++;
                }
                if (factorCount == 8) count++;
            }
        }
    */
  }
} public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    for(int n = 1; n<=N; n++){
      if(n%2 == 0){
        continue; 
      }
      int cnt = 0;
      
      for(int j = 1; j<=n; j++){
        if(n%j == 0){
          cnt++; 
        }
      }
      if(cnt == 8){
        ans++; 
      }
    }
    System.out.println(ans);
    
    
    
    
    
    /*
    Scanner sc = new Scanner (System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 0; i < N; i++){
            if (i%2 != 0){
              int factorCount = 0;
                for (int j = 1; j <= i; i++){
                    if (i%j==0) factorCount++;
                }
                if (factorCount == 8) count++;
            }
        }
    */
  }
} Main
/*
 * Click `Run` to execute the snippet below!
 */
 
import java.io.*;
import java.util.*;

/*
 * To execute Java, please define "static void main" on a class
 * named Solution.
 *
 * If you need more classes, simply define them inline.
 */

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