import std.stdio, std.range, std.conv, std.string, std.math;
import std.algorithm.comparison, std.algorithm.iteration, std.algorithm.mutation, std.algorithm.searching, std.algorithm.setops, std.algorithm.sorting;

void main() {
    long N = readln().strip.to!long;
    long[] list;
    long minCount=long.max;
    for (long i = 0; i < 5; ++i) {
        list~=readln().strip.to!long;
        minCount = min(list[$-1], minCount);
    }
    writeln(N/(minCount)+5);
}
