# C

import math

n = int(eval(input()))

a = []

for i in range(5):

    a.append(int(eval(input())))

ans = math.ceil((n/min(a) + 5) - 1)

print(ans)
from math import ceil

n = int(eval(input()))

a = []

for i in range(5):

    a.append(int(eval(input())))



ans = ceil(n / min(a)) + 4

print(ans)
# C
import math

n = int(eval(input()))
a = []
for i in range(5):
    a.append(int(eval(input())))
ans = math.ceil((n / min(a) + 5) - 1)
print(ans)

from math import ceil

n = int(eval(input()))
a = []
for i in range(5):
    a.append(int(eval(input())))
ans = ceil(n / min(a)) + 4
print(ans)

-# C -import math +from math import ceil -ans = math.ceil((n / min(a) + 5) - 1) +ans = ceil(n / min(a)) + 4