import java.util.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        int count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        }

        System.out.println(count);
    }
} import java.util.*; util.* java import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        int count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        int count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        }

        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        int count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 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 count = 0; count 0 for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        } int i = 105; int i = 105; i 105 i <= N i N i += 2 i += 2 i 2 {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        } {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        } int numDiv = 0; numDiv 0 for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            } int div = 1; int div = 1; div 1 div <= i div i div++ div++ div {
                if (i % div == 0) {
                    numDiv++;
                }
            } {
                if (i % div == 0) {
                    numDiv++;
                }
            } if (i % div == 0) {
                    numDiv++;
                } i % div == 0 i % div i div 0 {
                    numDiv++;
                } numDiv++ numDiv if (numDiv == 8) {
                count++;
            } numDiv == 8 numDiv 8 {
                count++;
            } 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 count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 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 count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        }

        System.out.println(count);
    }
} Main
import java.util.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        int count = 0;
        for (int i = 105; i <= N; i += 2) {
            int numDiv = 0;
            for (int div = 1; div <= i; div++) {
                if (i % div == 0) {
                    numDiv++;
                }
            }
            if (numDiv == 8) {
                count++;
            }
        }

        System.out.println(count);
    }
}