from math import ceil

n = int(eval(input()))

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

print((ceil(n/min(A))+4))

from math import ceil

n = int(eval(input()))

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

print((4+ceil(n/min(t))))
from math import ceil

n = int(eval(input()))
A = [int(eval(input())) for i in range(5)]
print((ceil(n / min(A)) + 4))

from math import ceil

n = int(eval(input()))
t = [int(eval(input())) for i in range(5)]
print((4 + ceil(n / min(t))))

-A = [int(eval(input())) for i in range(5)] -print((ceil(n / min(A)) + 4)) +t = [int(eval(input())) for i in range(5)] +print((4 + ceil(n / min(t))))