import java.util.*;

public class Main {

	static int p[];

	public static void inip(int n) {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	}

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

	static int p[];

	public static void inip(int n) {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	}

} Main static int p[]; p public static void inip(int n) {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	} inip {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	} int tmp[] = new int[n + 1]; tmp new int[n + 1] n + 1 n 1 tmp[0] = tmp[1] = -1 tmp[0] tmp 0 tmp[1] = -1 tmp[1] tmp 1 -1 1 tmp[2] = 1 tmp[2] tmp 2 1 for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		} int i = 0; int i = 0; i 0 i <= n i n ++i ++i i {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		} {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		} if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			} tmp[i] != -1 tmp[i] tmp i -1 1 {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			} tmp[i] = 1 tmp[i] tmp i 1 for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				} int j = 2; int j = 2; j 2 j * i <= n j * i j i n ++j ++j j {
					tmp[i * j] = -1;
				} {
					tmp[i * j] = -1;
				} tmp[i * j] = -1 tmp[i * j] tmp i * j i j -1 1 List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		} int i = 3; int i = 3; i 3 i <= n i n ++i ++i i {
			if (tmp[i] == 1)
				list.add(i);
		} {
			if (tmp[i] == 1)
				list.add(i);
		} if (tmp[i] == 1)
				list.add(i); tmp[i] == 1 tmp[i] tmp i 1 list.add(i) list.add list i p = new int[list.size()] p new int[list.size()] list.size() list.size list for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		} int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list ++i ++i i {
			p[i] = list.get(i);
		} {
			p[i] = list.get(i);
		} p[i] = list.get(i) p[i] p i list.get(i) list.get list i int n n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc inip(n) inip n sc.close() sc.close sc int cnt = 0; cnt 0 for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i < p.length i p.length p p.length ++i ++i i {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		} {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		} int tmp = (int) Math.pow(p[i], 3); tmp (int) Math.pow(p[i], 3) Math.pow Math p[i] p i 3 if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			} tmp < n tmp n {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			} int tmp2 = (int) Math.pow(p[i], 7); tmp2 (int) Math.pow(p[i], 7) Math.pow Math p[i] p i 7 if (tmp2 <= n)
					++cnt; tmp2 <= n tmp2 n ++cnt cnt for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			} int j = i + 1; int j = i + 1; j i + 1 i 1 j < p.length j p.length p p.length ++j ++j j {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			} {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			} if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				} tmp < n tmp n {
					if (tmp * p[j] <= n)
						++cnt;
				} if (tmp * p[j] <= n)
						++cnt; tmp * p[j] <= n tmp * p[j] tmp p[j] p j n ++cnt cnt if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				} p[i] * p[j] < n p[i] * p[j] p[i] p i p[j] p j n {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				} int tmp2 = p[i] * p[j]; tmp2 p[i] * p[j] p[i] p i p[j] p j for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					} int k = j + 1; int k = j + 1; k j + 1 j 1 k < p.length k p.length p p.length ++k ++k k {
						if (tmp2 * p[k] <= n)
							++cnt;
					} {
						if (tmp2 * p[k] <= n)
							++cnt;
					} if (tmp2 * p[k] <= n)
							++cnt; tmp2 * p[k] <= n tmp2 * p[k] tmp2 p[k] p k n ++cnt cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	static int p[];

	public static void inip(int n) {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	}

} public class Main {

	static int p[];

	public static void inip(int n) {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	}

} Main
import java.util.*;

public class Main {

	static int p[];

	public static void inip(int n) {
		int tmp[] = new int[n + 1];
		tmp[0] = tmp[1] = -1;
		tmp[2] = 1;
		for (int i = 0; i <= n; ++i) {
			if (tmp[i] != -1) {
				tmp[i] = 1;
				for (int j = 2; j * i <= n; ++j) {
					tmp[i * j] = -1;
				}
			}
		}
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 3; i <= n; ++i) {
			if (tmp[i] == 1)
				list.add(i);
		}
		p = new int[list.size()];
		for (int i = 0; i < list.size(); ++i) {
			p[i] = list.get(i);
		}
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		inip(n);
		sc.close();
		int cnt = 0;
		for (int i = 0; i < p.length; ++i) {
			int tmp = (int) Math.pow(p[i], 3);
			if (tmp < n) {
				int tmp2 = (int) Math.pow(p[i], 7);
				if (tmp2 <= n)
					++cnt;
			}
			for (int j = i + 1; j < p.length; ++j) {
				if (tmp < n) {
					if (tmp * p[j] <= n)
						++cnt;
				}
				if (p[i] * p[j] < n) {
					int tmp2 = p[i] * p[j];
					for (int k = j + 1; k < p.length; ++k) {
						if (tmp2 * p[k] <= n)
							++cnt;
					}
				}
			}
		}
		System.out.println(cnt);
	}

}
