program main
  implicit none
  integer(8) :: i, n, capacity(5), res

  read *, n
  do i = 1, 5
    read *, capacity(i)
  end do

  res = n / minval(capacity) + 5
  if (mod(n, minval(capacity)) == 0) then
    res = res - 1 
  end if
  print '(i0)', res
end program