var lines = [];

var readline = require('readline');
var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
});

rl.on('line', function (x) {
    lines.push(x);
});

rl.on('close', function () {
    var v = [];
    var N = lines.shift();
    N = Number(N);

    for (var i = 0; i < 5; i++) {
        v[i] = Number(lines[i]);
    }

    var a = Array(6).fill(0);
    var result = 0;

    a[0] = N;
    var min = Infinity; var hoge = 0;

    for (var i = 0; i < 5; i++) {
        if (v[i] < min) { min = v[i]; hoge = i; }
    }

    for (var i = 0; i < 5; i++) {
        if (i === hoge) { result += Math.ceil(N / v[i]); }
        else { result++; }
    }
    console.log(result);
    
});