import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner IN = new Scanner(System.in);
        int N = IN.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) {
            if (countY(i) == 8) {
                ans++;
            }
        }
        System.out.println(ans);
    }

    public static int countY(int x) {
        int result = 0;
        for(int i = 1; i <= x; i++) {
            if (x % i == 0) {
                result++;
            }
        }
        return result;
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner IN = new Scanner(System.in);
        int N = IN.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) {
            if (countY(i) == 8) {
                ans++;
            }
        }
        System.out.println(ans);
    }

    public static int countY(int x) {
        int result = 0;
        for(int i = 1; i <= x; i++) {
            if (x % i == 0) {
                result++;
            }
        }
        return result;
    }
} Main public static void main(String[] args) {
        Scanner IN = new Scanner(System.in);
        int N = IN.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) {
            if (countY(i) == 8) {
                ans++;
            }
        }
        System.out.println(ans);
    } main {
        Scanner IN = new Scanner(System.in);
        int N = IN.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) {
            if (countY(i) == 8) {
                ans++;
            }
        }
        System.out.println(ans);
    } Scanner IN = new Scanner(System.in); IN new Scanner(System.in) int N = IN.nextInt(); N IN.nextInt() IN.nextInt IN int ans = 0; ans 0 for (int i = 1; i <= N; i += 2) {
            if (countY(i) == 8) {
                ans++;
            }
        } int i = 1; int i = 1; i 1 i <= N i N i += 2 i += 2 i 2 {
            if (countY(i) == 8) {
                ans++;
            }
        } {
            if (countY(i) == 8) {
                ans++;
            }
        } if (countY(i) == 8) {
                ans++;
            } countY(i) == 8 countY(i) countY i 8 {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int countY(int x) {
        int result = 0;
        for(int i = 1; i <= x; i++) {
            if (x % i == 0) {
                result++;
            }
        }
        return result;
    } countY {
        int result = 0;
        for(int i = 1; i <= x; i++) {
            if (x % i == 0) {
                result++;
            }
        }
        return result;
    } int result = 0; result 0 for(int i = 1; i <= x; i++) {
            if (x % i == 0) {
                result++;
            }
        } int i = 1; int i = 1; i 1 i <= x i x i++ i++ i {
            if (x % i == 0) {
                result++;
            }
        } {
            if (x % i == 0) {
                result++;
            }
        } if (x % i == 0) {
                result++;
            } x % i == 0 x % i x i 0 {
                result++;
            } result++ result return result; result int x x
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner IN = new Scanner(System.in);
        int N = IN.nextInt();
        int ans = 0;
        for (int i = 1; i <= N; i += 2) {
            if (countY(i) == 8) {
                ans++;
            }
        }
        System.out.println(ans);
    }

    public static int countY(int x) {
        int result = 0;
        for(int i = 1; i <= x; i++) {
            if (x % i == 0) {
                result++;
            }
        }
        return result;
    }
}
