import java.util.Scanner;
import java.util.Arrays;

public class Main
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                int n = s.nextInt();
          //    int d = s.nextInt();
                int i=0,j=0,k=0,ans=0,ss=0,r=0;
                for(i=1;i<=n;i++){
                    if(i%2!=0){
                       r = i;
                       for(j=1;j<=n;j++){
                           if(r%j==0){
                              ss++;
                           }
                       }
                       if(ss==8){
                          ans++;
                       }
                       ss = 0;
                    }
                }
                System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main
{

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

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                int n = s.nextInt();
          //    int d = s.nextInt();
                int i=0,j=0,k=0,ans=0,ss=0,r=0;
                for(i=1;i<=n;i++){
                    if(i%2!=0){
                       r = i;
                       for(j=1;j<=n;j++){
                           if(r%j==0){
                              ss++;
                           }
                       }
                       if(ss==8){
                          ans++;
                       }
                       ss = 0;
                    }
                }
                System.out.println(ans);
	}
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                int n = s.nextInt();
          //    int d = s.nextInt();
                int i=0,j=0,k=0,ans=0,ss=0,r=0;
                for(i=1;i<=n;i++){
                    if(i%2!=0){
                       r = i;
                       for(j=1;j<=n;j++){
                           if(r%j==0){
                              ss++;
                           }
                       }
                       if(ss==8){
                          ans++;
                       }
                       ss = 0;
                    }
                }
                System.out.println(ans);
	}
}