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