// inputに入力データ全体が入る
function Main(input) {
  "use strict";
	const lines = input.split("\n");
  let nums = lines.map(s => parseInt(s, 10));
  nums.pop()

  const n = nums.shift();

  const smallest = nums.reduce( (acc, n) => {
    return acc > n ? n : acc
  } , 1000000000000000);

  const count = Math.ceil(n / smallest) + 4

	//出力
  console.log(count)
}
// Exec
Main(require("fs").readFileSync("/dev/stdin", "utf8"));