const main = (input) => {
  var n = input.trim().split("\n")[0]-0;
  var p = input.trim().split("\n").filter((v,i)=>i>0).map(v=>Number(v));
  var min = p[0]+1;
  var min_i = 1;
  for(var i=0;i<5;i++){
    if(min > p[i]){
      min = p[i];
      min_i = i;
    }
  }
  if(min > n) console.log(5);
  else console.log(Math.ceil(n/min)+4);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));
