import java.util.Scanner;

public class Main 
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	}
} import java.util.Scanner; Scanner java.util public class Main 
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	}
} Main public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	} main {
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n n=sc.nextInt() n sc.nextInt() sc.nextInt sc int res res count; count res=1 res 1 if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		} n<105 n 105 System.out.println(0) System.out.println System.out System System.out 0 if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		} n==105||n==106 n==105 n 105 n==106 n 106 System.out.println(1) System.out.println System.out System System.out 1 {
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		} for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			} int i=107; int i=107; i 107 i<=n i n i=i+2 i=i+2 i i+2 i 2 {
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			} {
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			} count=0 count 0 for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				} int j=1; int j=1; j 1 j<=i/2 j i/2 i 2 j=j+2 j=j+2 j j+2 j 2 {
					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++ count if(count==7)
					res++; count==7 count 7 res++ res System.out.println(res) System.out.println System.out System System.out res String args[] args public class Main 
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	}
} public class Main 
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	}
} Main
import java.util.Scanner;

public class Main 
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		int res,count;
		res=1;
		if(n<105)
			System.out.println(0);
		else if(n==105||n==106)
			System.out.println(1);
		else
		{
			for(int i=107;i<=n;i=i+2)
			{
				count=0;
				for(int j=1;j<=i/2;j=j+2)
				{
					if(i%j==0)
					{
						count++;
					}
				}
				if(count==7)
					res++;
			}
			System.out.println(res);
		}		
	}
}
