import java.util.*;

public class Main {

    

    public static void main(String[] atgs){

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    }

    private static boolean ishave(int n){
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    }
} import java.util.*; util.* java public class Main {

    

    public static void main(String[] atgs){

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    }

    private static boolean ishave(int n){
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    }
} Main public static void main(String[] atgs){

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    } main {

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc int num = Integer.parseInt(input); num Integer.parseInt(input) Integer.parseInt Integer input int count = 0; count 0 for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        } int i = 1; int i = 1; i 1 i <= num i num i+=2 i+=2 i 2 {
            if(ishave(i))
                count++;
        } {
            if(ishave(i))
                count++;
        } if(ishave(i))
                count++; ishave(i) ishave i count++ count System.out.println(count) System.out.println System.out System System.out count String[] atgs atgs private static boolean ishave(int n){
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    } ishave {
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    } int divisotCount = 0; divisotCount 0 for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if((n % i) == 0)
                divisotCount++;
        } {
            if((n % i) == 0)
                divisotCount++;
        } if((n % i) == 0)
                divisotCount++; (n % i) == 0 (n % i) n i 0 divisotCount++ divisotCount if(divisotCount == 8)
            return true;
        else return false; divisotCount == 8 divisotCount 8 return true; true return false; false int n n public class Main {

    

    public static void main(String[] atgs){

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    }

    private static boolean ishave(int n){
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    }
} public class Main {

    

    public static void main(String[] atgs){

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    }

    private static boolean ishave(int n){
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    }
} Main
import java.util.*;

public class Main {

    

    public static void main(String[] atgs){

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        int num = Integer.parseInt(input);
      	int count = 0;
        
        for(int i = 1; i <= num; i+=2){
            if(ishave(i))
                count++;
        }

        System.out.println(count);
    }

    private static boolean ishave(int n){
        int divisotCount = 0;
        for(int i = 1; i <= n; i++){
            if((n % i) == 0)
                divisotCount++;
        }

      	
        if(divisotCount == 8)
            return true;
        else return false;
    }
}