function Main(input) {
  input = input.split("\n");
  if (input[input.length -1 ] === "") {
    input.pop();
  }
  var people = input.shift();
  var time = 0;
  var minCapacity = Math.min(...input);

  if (people > minCapacity) {
    time += Math.floor(people / minCapacity);
  }
  time += 5;
  console.log(time);
}

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