import java.util.Scanner;

public class Main {

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

		int count = 0;
		for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		}
		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 = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int count = 0; count 0 for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		} {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		} int yaku = 0; yaku 0 if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			} i % 2 == 1 i % 2 i 2 1 {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			} for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				} int j = 1; int j = 1; j 1 j <= N j N j++ j++ j {
					if(i % j == 0) {
						yaku++;
					}
				} {
					if(i % j == 0) {
						yaku++;
					}
				} if(i % j == 0) {
						yaku++;
					} i % j == 0 i % j i j 0 {
						yaku++;
					} yaku++ yaku if(yaku == 8) {
					count++;
				} yaku == 8 yaku 8 {
					count++;
				} count++ count {
				continue;
			} continue; 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 = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		}
		System.out.println(count);
	}
} public class Main {

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

		int count = 0;
		for(int i = 1; i <= N; i++) {
			int yaku = 0;
			if(i % 2 == 1) {
				for(int j = 1; j <= N; j++) {
					if(i % j == 0) {
						yaku++;
					}
				}
				if(yaku == 8) {
					count++;
				}
			}else {
				continue;
			}
		}
		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 = Integer.parseInt(sc.next());
		sc.close();

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