program sample
    implicit none
    character(100)::s,t
    integer(8) :: i,j,k,m,n
    integer(8)::a,b,c,d,y(5)
    integer(8),allocatable::x(:)
  
    read(*,*) n
    do i=1,5
        read(*,*)y(i)
    end do
    a=minval(y)
    if(mod(n,a)==0)then
        b=n/a
    else
        b=n/a+1
    endif
    write(*,*)b+4
    stop
end program sample
  

