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