program main
  implicit none
  integer(8) :: N
  integer(8) :: A(5)
  integer(8) :: Amin
  integer(8) :: out
  integer :: mind(1)
  integer :: i
  
  read(*,*) N
  do i = 1,5
     read(*,*) A(i)
  end do
  Amin = minval( A )
  out = N/Amin +5
  write(*,'(i0)') out
  stop
end program main
