"use strict";

const input = require("fs").readFileSync("/dev/stdin", "utf8").trim();

const inputs = input.split("\n").map(i => +i);

const exec = (inputs) => {
  const N = inputs.shift();
  const maxs = inputs;

  const maxMin = Math.min(...maxs);

  return Math.ceil(N / maxMin) + (inputs.length - 1);
}

console.log(exec(inputs));