import java.io.*;

public class Main {
	public static void main(String[] args) {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	}
} import java.io.*; io.* java public class Main {
	public static void main(String[] args) {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	}
} Main public static void main(String[] args) {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	} main {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	} InputStreamReader in = new InputStreamReader(System.in); in new InputStreamReader(System.in) BufferedReader reader = new BufferedReader(in); reader new BufferedReader(in) try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		} catch(IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} String str = reader.readLine(); str reader.readLine() reader.readLine reader int N = Integer.parseInt(str); N Integer.parseInt(str) Integer.parseInt Integer str int sum_so = 0; sum_so 0 if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			} N < 105 N 105 {
				System.out.println(0);
			} System.out.println(0) System.out.println System.out System System.out 0 {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			} for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				} int i = 0; int i = 0; i 0 (i + 105) <= N (i + 105) i 105 N i +=2 i +=2 i 2 {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				} {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				} double kisu = i + 105; kisu i + 105 i 105 int count3 = 0; count3 0 int count5 = 0; count5 0 int count7 = 0; count7 0 int count11 = 0; count11 0 int count13 = 0; count13 0 int sum = 0; sum 0 while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					} (kisu % 3) == 0 (kisu % 3) kisu 3 0 {
						count3++;
						kisu /= 3;
					} count3++ count3 kisu /= 3 kisu 3 while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					} (kisu % 5) == 0 (kisu % 5) kisu 5 0 {
						count5++;
						kisu /= 5;
					} count5++ count5 kisu /= 5 kisu 5 while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					} (kisu % 7) == 0 (kisu % 7) kisu 7 0 {
						count7++;
						kisu /= 7;
					} count7++ count7 kisu /= 7 kisu 7 while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					} (kisu % 11) == 0 (kisu % 11) kisu 11 0 {
						count11++;
						kisu /= 11;
					} count11++ count11 kisu /= 11 kisu 11 while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					} (kisu % 13) == 0 (kisu % 13) kisu 13 0 {
						count13++;
						kisu /= 13;
					} count13++ count13 kisu /= 13 kisu 13 sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1) sum (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1) (count11 + 1) (count7 + 1) (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1) (count3 + 1) count3 1 (count5 + 1) count5 1 (count7 + 1) count7 1 (count11 + 1) count11 1 (count13 + 1) count13 1 if(sum == 8) {
						sum_so++;
					} sum == 8 sum 8 {
						sum_so++;
					} sum_so++ sum_so System.out.println(sum_so) System.out.println System.out System System.out sum_so String[] args args public class Main {
	public static void main(String[] args) {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	}
} public class Main {
	public static void main(String[] args) {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	}
} Main
import java.io.*;

public class Main {
	public static void main(String[] args) {
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(in);
		
		try {
			String str = reader.readLine();
			int N = Integer.parseInt(str);
			
			int sum_so = 0;
			
			if(N < 105) {
				System.out.println(0);
			} else {
				for(int i = 0; (i + 105) <= N; i +=2) {
					double kisu = i + 105;
					int count3 = 0;
					int count5 = 0;
					int count7 = 0;
					int count11 = 0;
					int count13 = 0;
					int sum = 0;
					
					while((kisu % 3) == 0) {
						count3++;
						kisu /= 3;
					}
					while((kisu % 5) == 0) {
						count5++;
						kisu /= 5;
					}
					while((kisu % 7) == 0) {
						count7++;
						kisu /= 7;
					}
					while((kisu % 11) == 0) {
						count11++;
						kisu /= 11;
					}
					while((kisu % 13) == 0) {
						count13++;
						kisu /= 13;
					}
					sum = (count3 + 1) * (count5 + 1) * (count7 + 1) * (count11 + 1) * (count13 + 1);
					if(sum == 8) {
						sum_so++;
					}
					
				}
				System.out.println(sum_so);
			}
			
		} catch(IOException e) {
			System.out.println(e);
		}
	}
}
