integer(16) N
integer(16) A,B,C,D,E
integer(16) t
integer(16) town(1:5)
read*,N,A,B,C,D,E
if(A==min(A,B,C,D,E))then
  t=5+(N-1)/A
  else
    if(B==min(B,C,D,E))then
      t=5+(N-1)/B
      else
      if(C==min(C,D,E))then
        t=5+(N-1)/C
        else
      if(D==min(D,E))then
        t=5+(N-1)/D
        else
        t=5+(N-1)/E
      end if
    end if
  endif
endif
print"(I0)",t
end