import java.util.*;

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int sum = 0;
        int count = 0;
        for(int i=1; i<=n; ++i){
            for(int j=1; j<=n;++j){
                if(i%j == 0){
                    sum = sum + 1;
                }
            }
            if(sum==8 && i%2==1){
                count = count + 1;
            }
            sum = 0;
        }
        System.out.println(count);
    }
}
