import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int n = sc.nextInt();
    int stack;
    int count = 0;
    int count2;
    int div = 1;
    
    if(n < 105) System.out.println(0);
    else{
    	for(int i = 105;i <= n;i+=2){
          stack = i;
          div = 1;
          for(int j = 3;j <= stack;j += 2){
            count2 = 1;
          	while(stack % j == 0){
              stack /= j;
              count2++;
            }
            div *= count2;
          }
          if(div == 8) count++;
        }
      System.out.println(count);
    }

  }
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int n = sc.nextInt();
    int stack;
    int count = 0;
    int count2;
    int div = 1;
    
    if(n < 105) System.out.println(0);
    else{
    	for(int i = 105;i <= n;i+=2){
          stack = i;
          div = 1;
          for(int j = 3;j <= stack;j += 2){
            count2 = 1;
          	while(stack % j == 0){
              stack /= j;
              count2++;
            }
            div *= count2;
          }
          if(div == 8) count++;
        }
      System.out.println(count);
    }

  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int n = sc.nextInt();
    int stack;
    int count = 0;
    int count2;
    int div = 1;
    
    if(n < 105) System.out.println(0);
    else{
    	for(int i = 105;i <= n;i+=2){
          stack = i;
          div = 1;
          for(int j = 3;j <= stack;j += 2){
            count2 = 1;
          	while(stack % j == 0){
              stack /= j;
              count2++;
            }
            div *= count2;
          }
          if(div == 8) count++;
        }
      System.out.println(count);
    }

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

  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int n = sc.nextInt();
    int stack;
    int count = 0;
    int count2;
    int div = 1;
    
    if(n < 105) System.out.println(0);
    else{
    	for(int i = 105;i <= n;i+=2){
          stack = i;
          div = 1;
          for(int j = 3;j <= stack;j += 2){
            count2 = 1;
          	while(stack % j == 0){
              stack /= j;
              count2++;
            }
            div *= count2;
          }
          if(div == 8) count++;
        }
      System.out.println(count);
    }

  }
} Main
import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	int n = sc.nextInt();
    int stack;
    int count = 0;
    int count2;
    int div = 1;
    
    if(n < 105) System.out.println(0);
    else{
    	for(int i = 105;i <= n;i+=2){
          stack = i;
          div = 1;
          for(int j = 3;j <= stack;j += 2){
            count2 = 1;
          	while(stack % j == 0){
              stack /= j;
              count2++;
            }
            div *= count2;
          }
          if(div == 8) count++;
        }
      System.out.println(count);
    }

  }
}
