import java.net.SecureCacheResponse;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

        System.out.println(countSum);
    }
} import java.net.SecureCacheResponse; SecureCacheResponse java.net import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

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

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

        System.out.println(countSum);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

        System.out.println(countSum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans = 0; ans 0 int countSum = 0; countSum 0 for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        } int i = n; int i = n; i n i > 0 i 0 i-- i-- i {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        } {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        } int count = 0; count 0 for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            } int j = i; int j = i; j i j > 0 j 0 j-- j-- j {
                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 if (count == 8 && i % 2 == 1) {
                countSum++;
            } count == 8 && i % 2 == 1 count == 8 count 8 i % 2 == 1 i % 2 i 2 1 {
                countSum++;
            } countSum++ countSum System.out.println(countSum) System.out.println System.out System System.out countSum String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

        System.out.println(countSum);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

        System.out.println(countSum);
    }
} Main
import java.net.SecureCacheResponse;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int ans = 0;
        int countSum = 0;
        for (int i = n; i > 0; i--) {
            int count = 0;
            for (int j = i; j > 0; j--) {
                if (i % j == 0) count++;
            }
            if (count == 8 && i % 2 == 1) {
                countSum++;
            }
        }

        System.out.println(countSum);
    }
}
