import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int[] divCount = new int[n + 1]; divCount new int[n + 1] n + 1 n 1 for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        } int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        } {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        } for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            } int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
                if (i % j == 0) {
                    divCount[i]++;
                }
            } {
                if (i % j == 0) {
                    divCount[i]++;
                }
            } if (i % j == 0) {
                    divCount[i]++;
                } i % j == 0 i % j i j 0 {
                    divCount[i]++;
                } divCount[i]++ divCount[i] divCount i int result = 0; result 0 for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        } int count divCount {
            if (count == 8) {
                result++;
            }
        } {
            if (count == 8) {
                result++;
            }
        } if (count == 8) {
                result++;
            } count == 8 count 8 {
                result++;
            } result++ result System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        sc.close();

        // 主処理
        int[] divCount = new int[n + 1];
        for (int i = 1; i <= n; i += 2) {
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    divCount[i]++;
                }
            }
        }

        int result = 0;
        for (int count : divCount) {
            if (count == 8) {
                result++;
            }
        }

        // 出力
        System.out.println(result);
    }
}
