from math import ceil



N = int(eval(input()))

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



print((ceil(N / min(v)) + 4))
from math import ceil



n = int(eval(input()))

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



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

from math import ceil

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

from math import ceil

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

-N = int(eval(input())) -v = [int(eval(input())) for _ in range(5)] -print((ceil(N / min(v)) + 4)) +n = int(eval(input())) +a = [int(eval(input())) for _ in range(5)] +print((ceil(n / min(a)) + 4))