'use strict';

function Main(input) {
  const N = input.split("\n")[0]
  const A = input.split("\n")[1]
  const B = input.split("\n")[2]
  const C = input.split("\n")[3]
  const D = input.split("\n")[4]
  const E = input.split("\n")[5]

  const ans = Math.max(Math.ceil(N/A), Math.ceil(N/B), Math.ceil(N/C), Math.ceil(N/D), Math.ceil(N/E)) + 4
  console.log(ans)
  
};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
