import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    } main {
        Main main = new Main();
        main.solve();
    } Main main = new Main(); main new Main() main.solve() main.solve main String[] args args public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    } solve {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int answer = 0; answer 0 for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        } {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        } if (i % 2 == 0) {
                continue;
            } i % 2 == 0 i % 2 i 2 0 {
                continue;
            } continue; int count = 0; count 0 for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            } int j = 1; int j = 1; j 1 j*2 <= i j*2 j 2 i j++ j++ j {
                if (i % j == 0) {
                    count += 1;
                }
            } {
                if (i % j == 0) {
                    count += 1;
                }
            } if (i % j == 0) {
                    count += 1;
                } i % j == 0 i % j i j 0 {
                    count += 1;
                } count += 1 count 1 if (count == 7) {
                answer += 1;
            } count == 7 count 7 {
                answer += 1;
            } answer += 1 answer 1 System.out.println(answer) System.out.println System.out System System.out answer public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int answer = 0;
        for (int i = 1; i <= N; i++) {
            if (i % 2 == 0) {
                continue;
            }
            int count = 0;
            for (int j = 1; j*2 <= i; j++) {
                if (i % j == 0) {
                    count += 1;
                }
            }
            if (count == 7) {
                answer += 1;
            }
        }
        System.out.println(answer);
    }
}
