
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB2() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveC() {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB2() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveC() {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main public static void main(String[] args) {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	} main {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	} new Main().solveB2() new Main().solveB2 new Main() String[] args args private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveA {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numA = 0; numA 0 int numB = 0; numB 0 try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numA = scanner.nextInt() numA scanner.nextInt() scanner.nextInt scanner numB = scanner.nextInt() numB scanner.nextInt() scanner.nextInt scanner System.out.println((numA - 1) * (numB - 1)) System.out.println System.out System System.out (numA - 1) * (numB - 1) (numA - 1) numA 1 (numB - 1) numB 1 System.out.println("") System.out.println System.out System System.out "" private void solveB() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveB {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			} int i = 1; int i = 1; i 1 i <= numN i numN i++ i++ i {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			} {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			} if (i % 2 == 0) {
					continue;
				} i % 2 == 0 i % 2 i 2 0 {
					continue;
				} continue; int wk = i; wk i Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>(); wkMap new HashMap<Integer, Integer>() for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				} int j = 2; int j = 2; j 2 j < i j i {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				} {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				} if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					} wk % j == 0 wk % j wk j 0 {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} wk /= j wk j wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1) wkMap.put wkMap j wkMap.get(j) == null ? 1 : wkMap.get(j) + 1 wkMap.get(j) == null wkMap.get(j) wkMap.get wkMap j null 1 wkMap.get(j) + 1 wkMap.get(j) wkMap.get wkMap j 1 {
						j++;
					} j++ j int wkRes = 1; wkRes 1 for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				} Integer val1 wkMap.values() wkMap.values wkMap {
					wkRes *= (val1 + 1);
				} {
					wkRes *= (val1 + 1);
				} wkRes *= (val1 + 1) wkRes (val1 + 1) val1 1 if (wkRes == 8) {
					count++;
				} wkRes == 8 wkRes 8 {
					count++;
				} count++ count System.out.println(count) System.out.println System.out System System.out count private void solveB2() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveB2 {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			} int i = 1; int i = 1; i 1 i <= numN i numN i++ i++ i {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			} {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			} if (i % 2 == 0) {
					continue;
				} i % 2 == 0 i % 2 i 2 0 {
					continue;
				} continue; int wkRes = 0; wkRes 0 for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				} int j = 1; int j = 1; j 1 j <= numN j numN j++ j++ j {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				} {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				} if (j % 2 == 0) {
						continue;
					} j % 2 == 0 j % 2 j 2 0 {
						continue;
					} continue; if (i % j == 0) {
						wkRes++;
					} i % j == 0 i % j i j 0 {
						wkRes++;
					} wkRes++ wkRes if (wkRes == 8) {
					count++;
				} wkRes == 8 wkRes 8 {
					count++;
				} count++ count System.out.println(count) System.out.println System.out System System.out count private void solveC() {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveC {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null String wkS; wkS long count = 0; count 0 try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} scanner = new Scanner(System.in) scanner new Scanner(System.in) wkS = scanner.next() wkS scanner.next() scanner.next scanner count = scanner.nextLong() count scanner.nextLong() scanner.nextLong scanner String wk = wkS; wk wkS if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			} count <= wkS.length() count wkS.length() wkS.length wkS {
				wk = wkS.substring(0, (int) count);
			} wk = wkS.substring(0, (int) count) wk wkS.substring(0, (int) count) wkS.substring wkS 0 (int) count for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			} int i = 0; int i = 0; i 0 i < wk.length() i wk.length() wk.length wk i++ i++ i {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			} {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			} if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				} wk.charAt(i) != '1' wk.charAt(i) wk.charAt wk i '1' {
					System.out.println(wk.charAt(i));
					return;
				} System.out.println(wk.charAt(i)) System.out.println System.out System System.out wk.charAt(i) wk.charAt wk i return; System.out.println(1) System.out.println System.out System System.out 1 private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveD {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 int numK = 0; numK 0 int numS = 0; numS 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner System.out.println("") System.out.println System.out System System.out "" public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB2() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveC() {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB2() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveC() {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
//		new Main().solvB();
		new Main().solveB2();
		//		new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();

			System.out.println((numA - 1) * (numB - 1));

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wk = i;
				Map<Integer, Integer> wkMap = new HashMap<Integer, Integer>();
				for (int j = 2; j < i;) {
					if (wk % j == 0) {
						wk /= j;
						wkMap.put(j, wkMap.get(j) == null ? 1 : wkMap.get(j) + 1);
					} else {
						j++;
					}
				}
				int wkRes = 1;
				for (Integer val1 : wkMap.values()) {
					wkRes *= (val1 + 1);
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB2() {
		Scanner scanner = null;
		int numN = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			int count = 0;
			/*
			 * 1からNまでの数値を全探索
			 */
			for (int i = 1; i <= numN; i++) {
				if (i % 2 == 0) {
					continue;
				}
				int wkRes = 0;
				/*
				 * 数値iが、約数をいくつ持つのか調べる
				 * 最大でもNまで（i<=Nだし）
				 */
				for (int j = 1; j <= numN; j++) {
					if (j % 2 == 0) {
						continue;
					}
					if (i % j == 0) {
						wkRes++;
					}
				}
				if (wkRes == 8) {
					count++;
				}
			}

			System.out.println(count);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveC() {
		Scanner scanner = null;
		String wkS;
		long count = 0;

		try {
			scanner = new Scanner(System.in);
			wkS = scanner.next();
			count = scanner.nextLong();
			String wk = wkS;
			if (count <= wkS.length()) {
				wk = wkS.substring(0, (int) count);
			}
			for (int i = 0; i < wk.length(); i++) {
				if (wk.charAt(i) != '1') {
					System.out.println(wk.charAt(i));
					return;
				}
			}
			System.out.println(1);
		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
}