import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

          System.out.println(count);
        }
    } import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

          System.out.println(count);
        }
    } Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

          System.out.println(count);
        } main {
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

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

        } int i=0; int i=0; i 0 2*i<N 2*i 2 i N i++ i++ i {
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        } {
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        } n = 2*i+1 n 2*i+1 2*i 2 i 1 for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            } int k=1; int k=1; k 1 k<n+1 k n+1 n 1 k++ k++ k {
                if(n%k==0){
                    yakusuu++;
                }
            } {
                if(n%k==0){
                    yakusuu++;
                }
            } if(n%k==0){
                    yakusuu++;
                } n%k==0 n%k n k 0 {
                    yakusuu++;
                } yakusuu++ yakusuu if(yakusuu==8){
                count++;
                
            } yakusuu==8 yakusuu 8 {
                count++;
                
            } count++ count yakusuu=0 yakusuu 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

          System.out.println(count);
        }
    } public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

          System.out.println(count);
        }
    } Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        //char[] S = sc.next().toCharArray();
        int count=0;
        int yakusuu=0;
        int n;
        for(int i=0; 2*i<N; i++){
            n = 2*i+1;
            for(int k=1; k<n+1; k++){
                if(n%k==0){
                    yakusuu++;
                }
            }
            if(yakusuu==8){
                count++;
                
            }
            yakusuu=0;

        }

          System.out.println(count);
        }
    }