import math



N=int(eval(input()))

A=[int(eval(input())) for _ in range(5)]

n=min(A)

for i in range(5):

  if n==A[i]:

    p=i

    break

k=math.ceil(N/n)

print((k+4))
import math



N=int(eval(input()))

A=[int(eval(input())) for _ in range(5)]

print((math.ceil(N/min(A))+4))

import math

N = int(eval(input()))
A = [int(eval(input())) for _ in range(5)]
n = min(A)
for i in range(5):
    if n == A[i]:
        p = i
        break
k = math.ceil(N / n)
print((k + 4))

import math

N = int(eval(input()))
A = [int(eval(input())) for _ in range(5)]
print((math.ceil(N / min(A)) + 4))

-n = min(A) -for i in range(5): -    if n == A[i]: -        p = i -        break -k = math.ceil(N / n) -print((k + 4)) +print((math.ceil(N / min(A)) + 4))