import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i=1; i<=N; i++) {
			int judge = 0;
			for(int j=1; j<=i; j++) {
				if(i % j == 0 && i % 2 == 1) {
					judge ++;
				}
			}if(judge == 8) {
				count ++;
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int judge = 0;
			for(int j=1; j<=i; j++) {
				if(i % j == 0 && i % 2 == 1) {
					judge ++;
				}
			}if(judge == 8) {
				count ++;
			}
		} {
			int judge = 0;
			for(int j=1; j<=i; j++) {
				if(i % j == 0 && i % 2 == 1) {
					judge ++;
				}
			}if(judge == 8) {
				count ++;
			}
		} int judge = 0; judge 0 for(int j=1; j<=i; j++) {
				if(i % j == 0 && i % 2 == 1) {
					judge ++;
				}
			} int j=1; int j=1; j 1 j<=i j i j++ j++ j {
				if(i % j == 0 && i % 2 == 1) {
					judge ++;
				}
			} {
				if(i % j == 0 && i % 2 == 1) {
					judge ++;
				}
			} if(i % j == 0 && i % 2 == 1) {
					judge ++;
				} i % j == 0 && i % 2 == 1 i % j == 0 i % j i j 0 i % 2 == 1 i % 2 i 2 1 {
					judge ++;
				} judge ++ judge if(judge == 8) {
				count ++;
			} judge == 8 judge 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 sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

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

	}

}
