import java.io.*;
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	
	public static void main(String[] args) {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
} Main public static void main(String[] args) {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	} main {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	} String[] strs = read(1); strs read(1) read 1 int n = Integer.parseInt(strs[0]); n Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 int count = 0; count 0 for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		} int i = 1; int i = 1; i 1 i <= n i n i += 2 i += 2 i 2 {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		} {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		} int tmp = 0; tmp 0 for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			} int j = 1; int j = 1; j 1 j <= i j i j++ j++ j {
				if (i % j == 0) {
					tmp++;
				}
			} {
				if (i % j == 0) {
					tmp++;
				}
			} if (i % j == 0) {
					tmp++;
				} i % j == 0 i % j i j 0 {
					tmp++;
				} tmp++ tmp if (tmp == 8) {
				count++;
			} tmp == 8 tmp 8 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	} read {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	} List<String> strList = new ArrayList<>(); strList new ArrayList<>() try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		} catch (IOException e) {
		} IOException e {
		} {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
				strList.add(br.readLine());
			} {
				strList.add(br.readLine());
			} strList.add(br.readLine()) strList.add strList br.readLine() br.readLine br return strList.toArray(new String[0]); strList.toArray(new String[0]) strList.toArray strList new String[0] 0 int len len public class Main {
	
	public static void main(String[] args) {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
} public class Main {
	
	public static void main(String[] args) {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
} Main
import java.io.*;
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		String[] strs = read(1);
		
		int n = Integer.parseInt(strs[0]);
		
		int count = 0;
		
		for (int i = 1; i <= n; i += 2) {
			int tmp = 0;
			for (int j = 1; j <= i; j++) {
				if (i % j == 0) {
					tmp++;
				}
			}
			
			if (tmp == 8) {
				count++;
			}
		}
		
		System.out.println(count);
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
}
