import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int N = scanner.nextInt();
			int count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); }
		  } 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 count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); }
		  } Main public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int N = scanner.nextInt();
			int count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); } main {
		    Scanner scanner = new Scanner(System.in);
		   
			int N = scanner.nextInt();
			int count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 if( N >= 105 ) 
			{
				count++;
			} N >= 105 N 105 {
				count++;
			} count++ count if( N >= 135 ) 
			{
				count++;
			} N >= 135 N 135 {
				count++;
			} count++ count if( N >= 165 ) 
			{
				count++;
			} N >= 165 N 165 {
				count++;
			} count++ count if( N >= 189 ) 
			{
				count++;
			} N >= 189 N 189 {
				count++;
			} count++ count if( N >= 195 ) 
			{
				count++;
			} N >= 195 N 195 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count scanner.close() scanner.close scanner String args[] args public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int N = scanner.nextInt();
			int count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); }
		  } public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int N = scanner.nextInt();
			int count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); }
		  } 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 count = 0;
			
			
			if( N >= 105 ) 
			{
				count++;
			}
			if( N >= 135 ) 
			{
				count++;
			}
			if( N >= 165 ) 
			{
				count++;
			}
			if( N >= 189 ) 
			{
				count++;
			}
			if( N >= 195 ) 
			{
				count++;
			}
			
			System.out.println(count);
			
		    scanner.close(); }
		  }