"use strict";
function Main(input) {
    let N = input.split("\n").map((v) => v - 0);
    let T = new Array(6).fill(0);
    let M = T[0] = N[0];
    N = N.slice(1, 6);
    let O = new Array(5).fill(0).map((v, i) => Math.ceil(M / N[i]));
    let t = 0;
    for (let n = 4; n >= 0; n--) {
        if (O[n] > 0) t += O[n];
        for (let m = 4; m >= 0 ; m--) O[m] -= O[n];
    }
    console.log(t);
}
if (typeof window === 'undefined') Main(require("fs").readFileSync("/dev/stdin", "utf8"));
