import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 0;

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 0;

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 0;

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 0;

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

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

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 0;

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int cnt = 0;

		for (int j = 1; j < N + 1; j = j + 2) {
			int yakusu = 0;
			for (int i = 1; i < N + 1; i++) {
				if(j<i)break;
				if (j % i == 0) {
					yakusu++;
				}
			}
			if (yakusu == 8) {
				cnt++;
			}
		}

		System.out.println(cnt);

		sc.close();
	}

}