import java.util.Scanner;

class Main{

	public static void main(String[] args) {


		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();

		int count=0;
		
		for(int i = 3;i <= N;i=i+2){
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		}
		
		System.out.println(count);
		

	}



} import java.util.Scanner; Scanner java.util class Main{

	public static void main(String[] args) {


		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();

		int count=0;
		
		for(int i = 3;i <= N;i=i+2){
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		}
		
		System.out.println(count);
		

	}



} Main public static void main(String[] args) {


		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();

		int count=0;
		
		for(int i = 3;i <= N;i=i+2){
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		}
		
		System.out.println(count);
		

	} main {


		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();

		int count=0;
		
		for(int i = 3;i <= N;i=i+2){
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		}
		
		System.out.println(count);
		

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int count=0; count 0 for(int i = 3;i <= N;i=i+2){
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		} int i = 3; int i = 3; i 3 i <= N i N i=i+2 i=i+2 i i+2 i 2 {
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		} {
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		} int y = 0; y 0 for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			} int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
				if(i % j==0){
					y++;
				}
				
			} {
				if(i % j==0){
					y++;
				}
				
			} if(i % j==0){
					y++;
				} i % j==0 i % j i j 0 {
					y++;
				} y++ y if(y == 8){
				count++;
			} y == 8 y 8 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;

class Main{

	public static void main(String[] args) {


		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();

		int count=0;
		
		for(int i = 3;i <= N;i=i+2){
			int y = 0;
			for(int j = 1;j <= i;j++){
				if(i % j==0){
					y++;
				}
				
			}
			if(y == 8){
				count++;
			}
			
		}
		
		System.out.println(count);
		

	}



}