import java.util.Scanner;
import java.util.LinkedHashSet;
import java.util.Set;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  }   
  static boolean check(int n){
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  }
} import java.util.Scanner; Scanner java.util import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Set; Set java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  }   
  static boolean check(int n){
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    } int i=105; int i=105; i 105 i<=n i n i++ i++ i {
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    } {
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    } if(i%2==1){
        if(check(i)){
          count++;
        }
      } i%2==1 i%2 i 2 1 {
        if(check(i)){
          count++;
        }
      } if(check(i)){
          count++;
        } check(i) check i {
          count++;
        } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args static boolean check(int n){
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  } check {
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  } int count=0; count 0 for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
        if(n%i == 0){
          count++;
        }
      } {
        if(n%i == 0){
          count++;
        }
      } if(n%i == 0){
          count++;
        } n%i == 0 n%i n i 0 {
          count++;
        } count++ count if(count==8){
      return true;
    }else{
      return false;
    } count==8 count 8 {
      return true;
    } return true; true {
      return false;
    } return false; false int n n public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  }   
  static boolean check(int n){
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  }   
  static boolean check(int n){
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  }
} Main
import java.util.Scanner;
import java.util.LinkedHashSet;
import java.util.Set;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int count = 0;
    for(int i=105;i<=n;i++){
      if(i%2==1){
        if(check(i)){
          count++;
        }
      }
    }
    System.out.println(count);
  }   
  static boolean check(int n){
    int count=0;
      for(int i=1;i<=n;i++){
        if(n%i == 0){
          count++;
        }
      }
    if(count==8){
      return true;
    }else{
      return false;
    }
  }
}