import java.util.*;
import java.util.ArrayList;

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

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count = 0;
        int answer = 0;
        int i = 1;
        while(i <= n){
            for(int j = 1; j <= i; j++){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                answer++;
            }
            count = 0;
            i = i+2;
        }
        System.out.print(answer);
    }
}