import java.util.*;

// ARC 98-D
// https://beta.atcoder.jp/contests/arc098/tasks/arc098_b

public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    }
} import java.util.*; util.* java public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    }
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    } main {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int answer = 0; answer 0 int N = in.nextInt(); N in.nextInt() in.nextInt in for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i += 2 i += 2 i 2 {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		} {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		} int nums = 0; nums 0 for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			} int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
				if (i % j == 0) {
					nums++;
				}
			} {
				if (i % j == 0) {
					nums++;
				}
			} if (i % j == 0) {
					nums++;
				} i % j == 0 i % j i j 0 {
					nums++;
				} nums++ nums if (nums == 8) {
				answer++;
			} nums == 8 nums 8 {
				answer++;
			} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    }
} public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    }
} Main
import java.util.*;

// ARC 98-D
// https://beta.atcoder.jp/contests/arc098/tasks/arc098_b

public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int answer = 0;
		int N = in.nextInt();
		
		for (int i = 1; i <= N; i += 2) {
			int nums = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					nums++;
				}
			}
			
			if (nums == 8) {
				answer++;
			}
		}
		
		System.out.println(answer);
    }
}
