import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i, j, k, ans = 0, count;

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i, j, k, ans = 0, count;

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i, j, k, ans = 0, count;

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i, j, k, ans = 0, count;

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int i i j j k k ans = 0 ans 0 count; count for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        } i = 1; i = 1 i 1 i <= n i n i++ i++ i {
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        } {
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

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

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i, j, k, ans = 0, count;

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i, j, k, ans = 0, count;

        for(i = 1; i <= n; i++){
            count = 0;
            if(i % 2 == 1){
                for(j = 1; j <= i; j++){
                    if(i % j == 0)count++;
                }
            }

            if(count == 8)ans++;
        }

        System.out.println(ans);
    }
}