import java.util.*;
import java.io.*;

public class Main
{
  	int n, d, cnt = 0;
  
    Main(Scanner in, PrintWriter out)
    {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
  	int n, d, cnt = 0;
  
    Main(Scanner in, PrintWriter out)
    {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} Main int n n d d cnt = 0; cnt 0 Main(Scanner in, PrintWriter out)
    {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    } Main {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    } n = in.nextInt() n in.nextInt() in.nextInt in for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      } int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      } {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      } d = 0 d 0 for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        } int j = 1; int j = 1; j 1 j*j <= i j*j j j i j++ j++ j {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        } {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        } if (i % j == 0)
            d += 2; i % j == 0 i % j i j 0 d += 2 d 2 if (j*j == i) d--; j*j == i j*j j j i d-- d if (d == 8) cnt++; d == 8 d 8 cnt++ cnt out.print(cnt) out.print out cnt Scanner in in PrintWriter out out public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} main {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) new	Main(in, out) out.close() out.close out String[] args args public class Main
{
  	int n, d, cnt = 0;
  
    Main(Scanner in, PrintWriter out)
    {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} public class Main
{
  	int n, d, cnt = 0;
  
    Main(Scanner in, PrintWriter out)
    {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} Main
import java.util.*;
import java.io.*;

public class Main
{
  	int n, d, cnt = 0;
  
    Main(Scanner in, PrintWriter out)
    {
      n = in.nextInt();
      for (int i = 1; i <= n; i += 2)
      {
        d = 0;
        for (int j = 1; j*j <= i; j++)
        {
          if (i % j == 0)
            d += 2;
          if (j*j == i) d--;
        }
        
        if (d == 8) cnt++;
      }
      out.print(cnt);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
}