function main(i) {
  i = i.split('\n');
  const N = Number(i[0]), a = Number(i[1]), b = Number(i[2]), c = Number(i[3]), d = Number(i[4]), e = Number(i[5]);
  const min = Math.min(a, b, c, d, e);
  console.log(Math.floor(N / min) + 5);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));