import javax.print.DocFlavor;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.function.BiConsumer;

public class Main {

    //グローバル変数を定義

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    }
} import javax.print.DocFlavor; DocFlavor javax.print import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigDecimal; BigDecimal java.math import java.math.BigInteger; BigInteger java.math import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset import java.util.*; util.* java import java.util.function.BiConsumer; BiConsumer java.util.function public class Main {

    //グローバル変数を定義

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    }
} Main public static void main(String[] args) throws IOException {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    } run {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int sum = 0; sum 0 for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        } int i=1; int i=1; i 1 i<=n i n i+=2 i+=2 i 2 {
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        } {
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        } int count = 0; count 0 for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            } int j=1; int j=1; j 1 j<=i j i j+=2 j+=2 j 2 {
                if(i % j == 0){
                    count++;
                }
            } {
                if(i % j == 0){
                    count++;
                }
            } if(i % j == 0){
                    count++;
                } i % j == 0 i % j i j 0 {
                    count++;
                } count++ count if(count == 8){
                sum++;
            } count == 8 count 8 {
                sum++;
            } sum++ sum System.out.println(sum) System.out.println System.out System System.out sum public class Main {

    //グローバル変数を定義

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    }
} public class Main {

    //グローバル変数を定義

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    }
} Main
import javax.print.DocFlavor;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.function.BiConsumer;

public class Main {

    //グローバル変数を定義

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;

        for(int i=1; i<=n; i+=2){
            int count = 0;
            for(int j=1; j<=i; j+=2){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 8){
                sum++;
            }
        }
        System.out.println(sum);
    }
}
