# encoding: utf-8
N = gets.chomp.to_i
trans = []
5.times do
  x = gets.chomp.to_i
  trans << x
end
pass = [N,0,0,0,0,0]
# p N
# p trans
# # p pass
# i = 0
# while true do
# # for i in 1..N do
#   if pass[5] >= N then
#     break
#   end
#   (0..4).reverse_each do |j|
#     if pass[j] > 0 then
#       t = (pass[j] < trans[j]) ? pass[j] : trans[j]
#       pass[j+1], pass[j] = (pass[j+1] + t), (pass[j] - t)
#     end
#   end
#   # p i
#   # p pass
#   i = i + 1
# end
# puts i
m = trans.min
if (N % m) == 0 then
  t = N / m
else
  t = N / m + 1 
end
puts t + 4