import math



N = int(eval(input()))

d = [int(eval(input())) for i in range(5)]



mi = d[0]

Ans = math.ceil(N / mi)

for i in d[1:]:

  Ans += 1

  if i < mi:

    x = math.ceil(N / i) - math.ceil(N / mi)

    Ans += x

    mi = i   



print(Ans)
N = int(eval(input()))

A = int(eval(input()))

B = int(eval(input()))

C = int(eval(input()))

D = int(eval(input()))

E = int(eval(input()))



x = min(A, B, C, D, E)



ans = 4 + N // x

if N % x != 0:

  ans += 1



print(ans)
import math

N = int(eval(input()))
d = [int(eval(input())) for i in range(5)]
mi = d[0]
Ans = math.ceil(N / mi)
for i in d[1:]:
    Ans += 1
    if i < mi:
        x = math.ceil(N / i) - math.ceil(N / mi)
        Ans += x
        mi = i
print(Ans)

N = int(eval(input()))
A = int(eval(input()))
B = int(eval(input()))
C = int(eval(input()))
D = int(eval(input()))
E = int(eval(input()))
x = min(A, B, C, D, E)
ans = 4 + N // x
if N % x != 0:
    ans += 1
print(ans)

-import math - -d = [int(eval(input())) for i in range(5)] -mi = d[0] -Ans = math.ceil(N / mi) -for i in d[1:]: -    Ans += 1 -    if i < mi: -        x = math.ceil(N / i) - math.ceil(N / mi) -        Ans += x -        mi = i -print(Ans) +A = int(eval(input())) +B = int(eval(input())) +C = int(eval(input())) +D = int(eval(input())) +E = int(eval(input())) +x = min(A, B, C, D, E) +ans = 4 + N // x +if N % x != 0: +    ans += 1 +print(ans)