import java.util.*;
public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

} Main static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		} solve {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans = 0; ans 0 sc.close() sc.close sc for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			} int i = 1; int i = 1; i 1 i<=n i n i+=2 i+=2 i 2 {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			} {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			} int check = 0; check 0 for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				} int j = 1; int j = 1; j 1 j<=i j i j++ j++ j {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				} {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				} if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					} i%j==0 i%j i j 0 {
						check++;
						if(check==8) {
							ans++;
						}
					} check++ check if(check==8) {
							ans++;
						} check==8 check 8 {
							ans++;
						} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans public static void main(String[] args) {
		solve();

	} main {
		solve();

	} solve() solve String[] args args public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

} public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int ans = 0;
			sc.close();
			for(int i = 1;i<=n;i+=2) {
				int check = 0;
				for(int j = 1;j<=i;j++) {
					if(i%j==0) {
						check++;
						if(check==8) {
							ans++;
						}
					}
				}
			}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

}