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

public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt_all = 0;
        for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        }
        System.out.println(cnt_all);
    }
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt_all = 0;
        for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        }
        System.out.println(cnt_all);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt_all = 0;
        for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        }
        System.out.println(cnt_all);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt_all = 0;
        for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        }
        System.out.println(cnt_all);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int cnt_all = 0; cnt_all 0 for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        } int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        } {
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        } int cnt = 0; cnt 0 for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            } int j=1; int j=1; j 1 j<=n j n j++ j++ j {
                if(i>=j && i%j==0){
                    cnt++;
                }
            } {
                if(i>=j && i%j==0){
                    cnt++;
                }
            } if(i>=j && i%j==0){
                    cnt++;
                } i>=j && i%j==0 i>=j i j i%j==0 i%j i j 0 {
                    cnt++;
                } cnt++ cnt if(cnt == 8){
                cnt_all++;
            } cnt == 8 cnt 8 {
                cnt_all++;
            } cnt_all++ cnt_all System.out.println(cnt_all) System.out.println System.out System System.out cnt_all String[] args args public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt_all = 0;
        for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        }
        System.out.println(cnt_all);
    }
} public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt_all = 0;
        for(int i=1; i<=n; i+=2){
            int cnt = 0;
            for(int j=1;j<=n;j++){
                if(i>=j && i%j==0){
                    cnt++;
                }
            }
            if(cnt == 8){
                cnt_all++;
            }
        }
        System.out.println(cnt_all);
    }
} Main
import java.util.*;
import static java.lang.Math.*;

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