program five_transportations
  implicit none
  integer(8) :: n, a(5) = 0, m, i
  read(*,*) n
  do i = 1, 5
    read(*,*) a(i)
  end do
  m = minval(a)
  write(*,'(i0)') (n+m-1)/m+4
end program five_transportations