import math

n=int(eval(input()))

a=int(eval(input()))

b=int(eval(input()))

c=int(eval(input()))

d=int(eval(input()))

e=int(eval(input()))

k=min(a,min(b,min(c,min(d,e))))

s=math.ceil(n/k)

while s*k<n:

  s+=1

print((5+s-1))
import math

n=int(eval(input()))

a=int(eval(input()))

b=int(eval(input()))

c=int(eval(input()))

d=int(eval(input()))

e=int(eval(input()))

k=min(a,min(b,min(c,min(d,e))))

i=math.ceil(n/k)

while i*k<n:

  i+=1

print((4+i))

import math

n = int(eval(input()))
a = int(eval(input()))
b = int(eval(input()))
c = int(eval(input()))
d = int(eval(input()))
e = int(eval(input()))
k = min(a, min(b, min(c, min(d, e))))
s = math.ceil(n / k)
while s * k < n:
    s += 1
print((5 + s - 1))

import math

n = int(eval(input()))
a = int(eval(input()))
b = int(eval(input()))
c = int(eval(input()))
d = int(eval(input()))
e = int(eval(input()))
k = min(a, min(b, min(c, min(d, e))))
i = math.ceil(n / k)
while i * k < n:
    i += 1
print((4 + i))

-s = math.ceil(n / k) -while s * k < n: -    s += 1 -print((5 + s - 1)) +i = math.ceil(n / k) +while i * k < n: +    i += 1 +print((4 + i))